Skip to content

Commit

Permalink
include only plugin files instead of all files by default
Browse files Browse the repository at this point in the history
  • Loading branch information
memo33 committed May 19, 2024
1 parent b4ce2c8 commit d6a391e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion channel-testing/yaml/templates/package-template-basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sc4pac/Constants.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 = """(?<!\.dat|\.sc4model|\.sc4lot|\.sc4desc|\.sc4|\.dll)$""" // excludes files with other file types
val sc4fileTypePattern = Pattern.compile("""\.dat|\.sc4model|\.sc4lot|\.sc4desc|\.sc4|\.dll$""", Pattern.CASE_INSENSITIVE)
val versionLatestRelease = "latest.release"
Expand Down

0 comments on commit d6a391e

Please sign in to comment.