Skip to content
Commits on Source (5)
## [3.14.7](https://git.griefed.de/Griefed/ServerPackCreator/compare/3.14.6...3.14.7) (2022-10-04)
### 🛠 Fixes
* **File and Directory exclusion:** Correctly exclude files and directories as per user input and default list of directories to exclude from the server pack by matching the paths of files and directories. Thanks to @ModernGamingWorld for reporting this! ([df4eb1a](https://git.griefed.de/Griefed/ServerPackCreator/commit/df4eb1a8756e2d53ca1304efe55e7e97866c2b94))
## [3.14.6](https://git.griefed.de/Griefed/ServerPackCreator/compare/3.14.5...3.14.6) (2022-09-29)
......
......@@ -518,7 +518,7 @@ public final class ServerPackHandler {
} else {
TreeSet<String> exclusions = new TreeSet<>(APPLICATIONPROPERTIES.getDirectoriesToExclude());
TreeSet<String> exclusions = new TreeSet<>();
directoriesToCopy.removeIf(exclude -> {
......@@ -596,16 +596,11 @@ public final class ServerPackHandler {
LOG.info("Ensuring files and/or directories are properly excluded.");
serverPackFiles.removeIf(
serverPackFile -> {
if (excludeFileOrDirectory(
serverPackFile.SOURCE_PATH.toString().replace("\\", "/"), exclusions)) {
LOG.debug("Excluding file/directory: " + serverPackFile.SOURCE_PATH);
return true;
} else {
return false;
}
});
serverPackFiles.removeIf(serverPackFile ->
excludeFileOrDirectory(
modpackDir,
serverPackFile.SOURCE_FILE,
exclusions));
LOG.info("Copying files to the server pack. This may take a while...");
......@@ -956,23 +951,37 @@ public final class ServerPackHandler {
}
/**
* Check whether the given file is present in the list of directories to exclude from the server
* pack.
* Check whether the given file or directory should be excluded from the server pack.
*
* @param fileToCheckFor The string to check for.
* @return Boolean. Returns true if the file is found in the list of directories to exclude, false
* if not.
* @param modpackDir The directory where the modpack resides in. Used to filter out any
* unwanted directories using
* {@link ApplicationProperties#getDirectoriesToExclude()}.
* @param fileToCheckFor The file or directory to check whether it should be excluded from the
* server pack.
* @param exclusions Files or directories determined by ServerPackCreator to be excluded from
* the server pack
* @return {@code true} if the file or directory was determined to be excluded from the server
* pack.
* @author Griefed
*/
private boolean excludeFileOrDirectory(String fileToCheckFor, final TreeSet<String> exclusions) {
boolean isPresentInList = false;
for (String entry : exclusions) {
if (fileToCheckFor.replace("\\", "/").contains(entry)) {
isPresentInList = true;
break;
private boolean excludeFileOrDirectory(
String modpackDir,
File fileToCheckFor,
final TreeSet<String> exclusions) {
exclusions.addAll(APPLICATIONPROPERTIES.getDirectoriesToExclude());
for (String exclusion : exclusions) {
if (exclusion.matches("^\\.[0-9a-zA-Z]+$") && fileToCheckFor.getAbsolutePath().endsWith(exclusion)) {
LOG.debug("Excluding file/directory: " + fileToCheckFor.getAbsolutePath());
return true;
} else if (fileToCheckFor.getAbsolutePath().startsWith(new File(modpackDir,exclusion).getAbsolutePath())) {
LOG.debug("Excluding file/directory: " + fileToCheckFor.getAbsolutePath());
return true;
}
}
return isPresentInList;
return false;
}
/**
......
## [3.14.6](https://git.griefed.de/Griefed/ServerPackCreator/compare/3.14.5...3.14.6) (2022-09-29)
### 🦊 CI/CD
* **Maintenance Release:** Writes the current version to your serverpackcreator.properties to `de.griefed.serverpackcreator.version.old`, so following version can execute migrations properly. If you've used SPC before, please update to this version and run it at least once. ([f0de921](https://git.griefed.de/Griefed/ServerPackCreator/commit/f0de921622b73cad9837f74cb13af3cad20a0615))
## [3.14.5](https://git.griefed.de/Griefed/ServerPackCreator/compare/3.14.4...3.14.5) (2022-09-26)
......
......@@ -9,25 +9,25 @@
"version": "1.0.0",
"license": " LGPL-2.1",
"dependencies": {
"@quasar/cli": "^1.3.2",
"@quasar/cli": "1.3.2",
"@quasar/extras": "1.15.2",
"axios": "^0.27.2",
"core-js": "^3.24.1",
"quasar": "^2.7.7",
"tsparticles": "^1.43.1",
"axios": "0.27.2",
"core-js": "3.24.1",
"quasar": "2.7.7",
"tsparticles": "1.43.1",
"vue": "3.2.38",
"vue-class-component": "^8.0.0-rc.1"
"vue-class-component": "8.0.0-rc.1"
},
"devDependencies": {
"@babel/eslint-parser": "^7.18.9",
"@quasar/app": "^3.3.3",
"@types/node": "^18.7.9",
"@babel/eslint-parser": "7.18.9",
"@quasar/app": "3.3.3",
"@types/node": "18.7.9",
"eslint": "8.23.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-vue": "^9.3.0",
"eslint-webpack-plugin": "^3.2.0",
"minimist": ">=1.2.6",
"terser": "^5.14.2"
"eslint-config-prettier": "8.5.0",
"eslint-plugin-vue": "9.3.0",
"eslint-webpack-plugin": "3.2.0",
"minimist": "1.2.6",
"terser": "5.14.2"
},
"engines": {
"node": "^16.9.1",
......@@ -2175,7 +2175,7 @@
"node_modules/@quasar/app/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
},
"node_modules/@quasar/app/node_modules/qs": {
......@@ -6070,9 +6070,9 @@
}
},
"node_modules/eslint-webpack-plugin/node_modules/jest-worker": {
"version": "28.1.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz",
"integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==",
"version": "28.1.3",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz",
"integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==",
"dev": true,
"dependencies": {
"@types/node": "*",
......@@ -12555,7 +12555,7 @@
"version": "1.43.1",
"resolved": "https://registry.npmjs.org/tsparticles/-/tsparticles-1.43.1.tgz",
"integrity": "sha512-6EuHncwqzoyTlUxc11YH8LVlwVUgpYaZD0yMOeA2OvRqFZ9VQV8EjjQ6ZfXt6pfGA1ObPwU929jveFatxwTQkg==",
"deprecated": "Version 2.x is the current version, v1 is obsolete now",
"deprecated": "2.3.1 is out and it has a smaller output size",
"funding": [
{
"type": "github",
......@@ -15473,7 +15473,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"dev": true
},
"qs": {
......@@ -18672,9 +18672,9 @@
"dev": true
},
"jest-worker": {
"version": "28.1.1",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.1.tgz",
"integrity": "sha512-Au7slXB08C6h+xbJPp7VIb6U0XX5Kc9uel/WFc6/rcTzGiaVCBRngBExSYuXSLFPULPSYU3cJ3ybS988lNFQhQ==",
"version": "28.1.3",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz",
"integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==",
"dev": true,
"requires": {
"@types/node": "*",
......
......@@ -27,25 +27,25 @@
"build": "quasar build"
},
"dependencies": {
"@quasar/cli": "^1.3.2",
"@quasar/cli": "1.3.2",
"@quasar/extras": "1.15.2",
"axios": "^0.27.2",
"core-js": "^3.24.1",
"quasar": "^2.7.7",
"tsparticles": "^1.43.1",
"axios": "0.27.2",
"core-js": "3.24.1",
"quasar": "2.7.7",
"tsparticles": "1.43.1",
"vue": "3.2.38",
"vue-class-component": "^8.0.0-rc.1"
"vue-class-component": "8.0.0-rc.1"
},
"devDependencies": {
"terser" : "^5.14.2",
"@babel/eslint-parser": "^7.18.9",
"@quasar/app": "^3.3.3",
"terser" : "5.14.2",
"@babel/eslint-parser": "7.18.9",
"@quasar/app": "3.3.3",
"eslint": "8.23.0",
"@types/node": "^18.7.9",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-vue": "^9.3.0",
"eslint-webpack-plugin": "^3.2.0",
"minimist": ">=1.2.6"
"@types/node": "18.7.9",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-vue": "9.3.0",
"eslint-webpack-plugin": "3.2.0",
"minimist": "1.2.6"
},
"browserslist": [
"last 10 Chrome versions",
......
......@@ -4143,6 +4143,11 @@
"1.19.2-43.1.24",
"1.19.2-43.1.25",
"1.19.2-43.1.26",
"1.19.2-43.1.27"
"1.19.2-43.1.27",
"1.19.2-43.1.28",
"1.19.2-43.1.29",
"1.19.2-43.1.30",
"1.19.2-43.1.32",
"1.19.2-43.1.33"
]
}
\ No newline at end of file
......@@ -3,8 +3,8 @@
<groupId>org.quiltmc</groupId>
<artifactId>quilt-loader</artifactId>
<versioning>
<latest>0.17.5-beta.2</latest>
<release>0.17.5-beta.2</release>
<latest>0.17.5-beta.3</latest>
<release>0.17.5-beta.3</release>
<versions>
<version>0.16.0-beta.1</version>
<version>0.16.0-beta.2</version>
......@@ -45,7 +45,8 @@
<version>0.17.4</version>
<version>0.17.5-beta.1</version>
<version>0.17.5-beta.2</version>
<version>0.17.5-beta.3</version>
</versions>
<lastUpdated>20220906203141</lastUpdated>
<lastUpdated>20220928023022</lastUpdated>
</versioning>
</metadata>