Skip to content

Commit d46fd0d

Browse files
authored
#523: exclude files from wrong OS (#562)
1 parent 3a50488 commit d46fd0d

File tree

5 files changed

+46
-12
lines changed

5 files changed

+46
-12
lines changed

cli/pom.xml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@
128128
<configuration>
129129
<outputDirectory>${project.build.directory}/package</outputDirectory>
130130
<resources>
131+
<!--
132+
Maven filtering can resolve ${...} variables in resource files.
133+
However, in system folder there are resources that do not need filtering.
134+
Some of them cannot be filtered by maven as they would cause such error:
135+
InfoPlist.strings failed with MalformedInputException: Input length = 1
136+
Therefore we exclude the system folder here from the resource.
137+
-->
131138
<resource>
132139
<directory>src/main/package</directory>
133140
<filtering>true</filtering>
@@ -136,6 +143,14 @@
136143
<exclude>system/**/*</exclude>
137144
</excludes>
138145
</resource>
146+
<!-- However, we then exclude system folder entirely so we need to added it here without filtering -->
147+
<resource>
148+
<directory>src/main/package</directory>
149+
<filtering>false</filtering>
150+
<includes>
151+
<include>system/**/*</include>
152+
</includes>
153+
</resource>
139154
</resources>
140155
</configuration>
141156
</execution>
@@ -232,22 +247,22 @@
232247
<configuration>
233248
<artifacts>
234249
<artifact>
235-
<file>${project.build.directory}/${project.artifactId}-${revision}-windows_x86_64.tar.gz</file>
250+
<file>${project.build.directory}/${project.artifactId}-${revision}-windows-x64.tar.gz</file>
236251
<type>tar.gz</type>
237252
<classifier>windows-x64</classifier>
238253
</artifact>
239254
<artifact>
240-
<file>${project.build.directory}/${project.artifactId}-${revision}-linux_x86_64.tar.gz</file>
255+
<file>${project.build.directory}/${project.artifactId}-${revision}-linux-x64.tar.gz</file>
241256
<type>tar.gz</type>
242257
<classifier>linux-x64</classifier>
243258
</artifact>
244259
<artifact>
245-
<file>${project.build.directory}/${project.artifactId}-${revision}-osx_x86_64.tar.gz</file>
260+
<file>${project.build.directory}/${project.artifactId}-${revision}-mac-x64.tar.gz</file>
246261
<type>tar.gz</type>
247262
<classifier>mac-x64</classifier>
248263
</artifact>
249264
<artifact>
250-
<file>${project.build.directory}/${project.artifactId}-${revision}-osx_aarch_64.tar.gz</file>
265+
<file>${project.build.directory}/${project.artifactId}-${revision}-mac-arm.tar.gz</file>
251266
<type>tar.gz</type>
252267
<classifier>mac-arm</classifier>
253268
</artifact>

cli/src/main/assembly/release-macos-13.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4-
<id>osx_x86_64</id>
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
<id>mac-x64</id>
55
<formats>
66
<format>tar.gz</format>
77
</formats>
@@ -17,6 +17,11 @@
1717
<fileSet>
1818
<directory>${project.build.directory}/package</directory>
1919
<outputDirectory>.</outputDirectory>
20+
<excludes>
21+
<exclude>**/*.bat</exclude>
22+
<exclude>system/windows/**</exclude>
23+
<exclude>system/linux/**</exclude>
24+
</excludes>
2025
</fileSet>
2126
</fileSets>
2227
</assembly>

cli/src/main/assembly/release-macos-latest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4-
<id>osx_aarch_64</id>
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
<id>mac-arm</id>
55
<formats>
66
<format>tar.gz</format>
77
</formats>
@@ -17,6 +17,11 @@
1717
<fileSet>
1818
<directory>${project.build.directory}/package</directory>
1919
<outputDirectory>.</outputDirectory>
20+
<excludes>
21+
<exclude>**/*.bat</exclude>
22+
<exclude>system/windows/**</exclude>
23+
<exclude>system/linux/**</exclude>
24+
</excludes>
2025
</fileSet>
2126
</fileSets>
2227
</assembly>

cli/src/main/assembly/release-ubuntu-latest.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4-
<id>linux_x86_64</id>
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
<id>linux-x64</id>
55
<formats>
66
<format>tar.gz</format>
77
</formats>
@@ -17,6 +17,11 @@
1717
<fileSet>
1818
<directory>${project.build.directory}/package</directory>
1919
<outputDirectory>.</outputDirectory>
20+
<excludes>
21+
<exclude>**/*.bat</exclude>
22+
<exclude>system/windows/**</exclude>
23+
<exclude>system/mac/**</exclude>
24+
</excludes>
2025
</fileSet>
2126
</fileSets>
2227
</assembly>

cli/src/main/assembly/release-windows-latest.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
4-
<id>windows_x86_64</id>
3+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 https://maven.apache.org/xsd/assembly-1.1.2.xsd">
4+
<id>windows-x64</id>
55
<formats>
66
<format>tar.gz</format>
77
</formats>
@@ -17,6 +17,10 @@
1717
<fileSet>
1818
<directory>${project.build.directory}/package</directory>
1919
<outputDirectory>.</outputDirectory>
20+
<excludes>
21+
<exclude>system/mac/**</exclude>
22+
<exclude>system/linux/**</exclude>
23+
</excludes>
2024
</fileSet>
2125
</fileSets>
2226
</assembly>

0 commit comments

Comments
 (0)