diff --git a/CHANGELOG.md b/CHANGELOG.md index 0525f4d..1dcfa32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - The `channel add/remove` commands now show a message about the result of the command. - The instructions for setting the Simtropolis authentication cookie have been moved to the file [sc4pac.bat](https://github.com/memo33/sc4pac-tools/blob/main/src/scripts/sc4pac.bat#L13-L32). +- The default `include` filter has been changed to include only plugin files (`.sc4*`/`.dat`/`.dll`) instead of arbitrary file extensions. + This ensures that non-plugin files are not accidentally installed if a custom `exclude` filter is specified. + (The default `exclude` filter remains unchanged and excludes any non-plugin files (`.sc4*`/`.dat`/`.dll`).) ### Fixed - a bug causing assets containing Clickteam installers to be reinstalled whenever running `sc4pac update`. diff --git a/channel-testing/yaml/templates/package-template-basic.yaml b/channel-testing/yaml/templates/package-template-basic.yaml index b828096..ce045c3 100644 --- a/channel-testing/yaml/templates/package-template-basic.yaml +++ b/channel-testing/yaml/templates/package-template-basic.yaml @@ -39,7 +39,7 @@ assets: # Optional list of assets from which to extract files (zero or more) # (starting with and separated by _forward_ slashes for platform independence). # Note that special characters need to be escaped: \.[]{}()<>*+-=!?^$| (see https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html). # The matching is case-insensitive for file-system independence. - # By default, every file is included. + # By default, every plugin file is included (.dat/.sc4model/.sc4lot/.sc4desc/.sc4/.dll). include: - "/folder/file1.dat" - "/folder2/" diff --git a/src/main/scala/sc4pac/Constants.scala b/src/main/scala/sc4pac/Constants.scala index b2c121a..b28ae25 100644 --- a/src/main/scala/sc4pac/Constants.scala +++ b/src/main/scala/sc4pac/Constants.scala @@ -10,7 +10,7 @@ object Constants { val link = new Configuration("link") // extends `compile` with actual assets (TODO rename to `install`?) export JsonRepoUtil.sc4pacAssetOrg // val sc4pacAssetOrg = Organization("sc4pacAsset") val sc4pacAssetType = Type("sc4pac-resource") // TODO - val defaultInclude = """.""" // includes everything + val defaultInclude = """(?<=\.dat|\.sc4model|\.sc4lot|\.sc4desc|\.sc4|\.dll)$""" // includes only plugin files val defaultExclude = """(?