Skip to content

Commit d1e6d82

Browse files
committed
Added platform override
1 parent 873647d commit d1e6d82

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
101101
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
102102
- name: Build Release
103-
run: ant -noinput -buildfile build/build.xml ${{ matrix.os_prefix }}-dist -Dversion="${{ needs.version.outputs.version }}"
103+
run: ant -noinput -buildfile build/build.xml ${{ matrix.os_prefix }}-dist -Dversion="${{ needs.version.outputs.version }}" -Dplatform.override=${{ matrix.os_prefix }}
104104
env:
105105
PROCESSING_APP_PASSWORD: ${{ secrets.PROCESSING_APP_PASSWORD }}
106106
PROCESSING_APPLE_ID: ${{ secrets.PROCESSING_APPLE_ID }}

build/build.xml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,37 @@
99
</classpath>
1010
</taskdef>
1111

12-
<!-- Sets properties for macos/windows/linux depending on current system -->
12+
<property name="platform.override" value="" description="Override OS (windows/linux/mac)" />
13+
14+
<!-- First check if we have an override -->
15+
<condition property="platform" value="${platform.override}">
16+
<isset property="platform.override"/>
17+
</condition>
18+
19+
<!-- Only do OS detection if platform isn't already set by override -->
1320
<condition property="platform" value="macos">
14-
<os family="mac" />
21+
<and>
22+
<not><isset property="platform"/></not>
23+
<os family="mac" />
24+
</and>
1525
</condition>
1626

1727
<condition property="platform" value="windows">
18-
<os family="windows" />
28+
<and>
29+
<not><isset property="platform"/></not>
30+
<os family="windows" />
31+
</and>
1932
</condition>
2033

2134
<condition property="platform" value="linux">
2235
<and>
23-
<os family="unix" />
24-
<not>
25-
<os family="mac" />
26-
</not>
36+
<not><isset property="platform"/></not>
37+
<and>
38+
<os family="unix" />
39+
<not>
40+
<os family="mac" />
41+
</not>
42+
</and>
2743
</and>
2844
</condition>
2945

@@ -114,7 +130,7 @@
114130

115131
<!-- ${platform} ok for Windows/Linux, but 'macos' needs to be 'mac' -->
116132
<condition property="jdk.download.os" value="mac" else="${platform}">
117-
<os family="mac" />
133+
<equals arg1="${platform}" arg2="macos"/>
118134
</condition>
119135

120136
<!-- amd64 or x86_64 use x64, others use os.arch -->

0 commit comments

Comments
 (0)