Skip to content

Commit f777b0f

Browse files
authored
Merge pull request #76 from beNative/codex/fix-release-artefact-building
Rename Windows 32-bit release artifacts to win32
2 parents 0da5fb7 + 36c1ee3 commit f777b0f

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
build_command: npx electron-builder --publish never --win --x64
2424
artifact_name: windows-x64-artifacts
2525
- os: windows-latest
26-
display_name: Windows ia32
26+
display_name: Windows win32
2727
build_command: npx electron-builder --publish never --win --ia32
28-
artifact_name: windows-ia32-artifacts
28+
artifact_name: windows-win32-artifacts
2929
- os: ubuntu-latest
3030
display_name: Linux x64
3131
build_command: npx electron-builder --publish never --linux --x64

.github/workflows/main.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
build_command: npx electron-builder --publish never --win --x64
3030
artifact_name: windows-x64-artifacts
3131
- os: windows-latest
32-
display_name: Windows ia32
32+
display_name: Windows win32
3333
build_command: npx electron-builder --publish never --win --ia32
34-
artifact_name: windows-ia32-artifacts
34+
artifact_name: windows-win32-artifacts
3535
- os: ubuntu-latest
3636
display_name: Linux x64
3737
build_command: npx electron-builder --publish never --linux --x64
@@ -121,26 +121,30 @@ jobs:
121121
fi
122122
fi
123123
124-
# --- Windows (ia32) ---
125-
if [[ -d artifacts/windows-ia32-artifacts ]]; then
126-
for file in artifacts/windows-ia32-artifacts/*.exe; do
124+
# --- Windows (win32) ---
125+
if [[ -d artifacts/windows-win32-artifacts ]]; then
126+
for file in artifacts/windows-win32-artifacts/*.exe; do
127127
base="$(basename "$file")"
128128
target="$base"
129-
if [[ "$base" != *-ia32.exe ]]; then
130-
target="${base%.exe}-ia32.exe"
129+
if [[ "$base" == *-ia32* ]]; then
130+
target="${base//-ia32/-win32}"
131+
elif [[ "$base" != *-win32.exe ]]; then
132+
target="${base%.exe}-win32.exe"
131133
fi
132134
cp "$file" "release_upload/$target"
133135
done
134-
for file in artifacts/windows-ia32-artifacts/*.exe.blockmap; do
136+
for file in artifacts/windows-win32-artifacts/*.exe.blockmap; do
135137
base="$(basename "$file")"
136138
target="$base"
137-
if [[ "$base" != *-ia32.exe.blockmap ]]; then
138-
target="${base/.exe/-ia32.exe}"
139+
if [[ "$base" == *-ia32* ]]; then
140+
target="${base//-ia32/-win32}"
141+
elif [[ "$base" != *-win32.exe.blockmap ]]; then
142+
target="${base/.exe/-win32.exe}"
139143
fi
140144
cp "$file" "release_upload/$target"
141145
done
142-
if [[ -f artifacts/windows-ia32-artifacts/latest.yml ]]; then
143-
cp artifacts/windows-ia32-artifacts/latest.yml release_upload/latest-ia32.yml
146+
if [[ -f artifacts/windows-win32-artifacts/latest.yml ]]; then
147+
cp artifacts/windows-win32-artifacts/latest.yml release_upload/latest-win32.yml
144148
fi
145149
fi
146150

tests/autoUpdateHelpers.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313

1414
test('detectArchFromFileName recognises common Windows architectures', () => {
1515
assert.equal(detectArchFromFileName('app-setup-x64.exe'), 'x64');
16-
assert.equal(detectArchFromFileName('app-setup-ia32.exe'), 'ia32');
16+
assert.equal(detectArchFromFileName('app-setup-win32.exe'), 'ia32');
1717
assert.equal(detectArchFromFileName('APP-X86.msi'), 'ia32');
1818
assert.equal(detectArchFromFileName('build-aarch64.zip'), 'arm64');
1919
assert.equal(detectArchFromFileName('installer-armhf.tar.gz'), 'armv7l');
@@ -50,7 +50,7 @@ const createUpdateInfo = (overrides: Partial<UpdateDownloadedEvent>): UpdateDown
5050
test('extractCandidateNamesFromUpdateInfo aggregates filenames from multiple sources', () => {
5151
const info = createUpdateInfo({
5252
files: [
53-
{ url: 'https://example.com/app-ia32.exe' } as any,
53+
{ url: 'https://example.com/app-win32.exe' } as any,
5454
{ url: 'https://example.com/app-x64.exe?raw=1' } as any,
5555
],
5656
path: '/tmp/legacy/App-x64.exe',
@@ -59,11 +59,11 @@ test('extractCandidateNamesFromUpdateInfo aggregates filenames from multiple sou
5959

6060
const candidates = extractCandidateNamesFromUpdateInfo(info, '.exe');
6161
const sorted = [...candidates].sort();
62-
assert.deepEqual(sorted, ['App-x64.exe', 'app-ia32.exe', 'app-x64.exe']);
62+
assert.deepEqual(sorted, ['App-x64.exe', 'app-win32.exe', 'app-x64.exe']);
6363
});
6464

6565
test('filterNamesByArch prefers matches but falls back when none exist', () => {
66-
const names = ['app-ia32.exe', 'app-x64.exe'];
66+
const names = ['app-win32.exe', 'app-x64.exe'];
6767
assert.deepEqual(filterNamesByArch(names, 'x64'), ['app-x64.exe']);
6868
assert.deepEqual(filterNamesByArch(names, 'arm64'), names);
6969
assert.deepEqual(filterNamesByArch(names, null), names);
@@ -72,7 +72,7 @@ test('filterNamesByArch prefers matches but falls back when none exist', () => {
7272
test('determineDownloadedUpdateArch prioritises metadata that matches the downloaded file', () => {
7373
const info = createUpdateInfo({
7474
files: [
75-
{ url: 'https://example.com/app-1.2.3-windows-ia32-setup.exe' } as any,
75+
{ url: 'https://example.com/app-1.2.3-windows-win32-setup.exe' } as any,
7676
{ url: 'https://example.com/app-1.2.3-windows-x64-setup.exe' } as any,
7777
],
7878
downloadedFile: '/tmp/app-1.2.3-windows-x64-setup.exe',

0 commit comments

Comments
 (0)