Skip to content

Commit 5775f85

Browse files
Support amazonlinux2
1 parent 38bb30a commit 5775f85

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/test.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ jobs:
2525
os: ubuntu-20.04
2626
- swift-version: wasm-5.6.0-RELEASE
2727
os: macos-11
28+
- swift-version: wasm-5.8.0-RELEASE
29+
os: ubuntu-latest
30+
container: amazonlinux:2
2831
runs-on: ${{ matrix.os }}
32+
container: ${{ matrix.container }}
2933
steps:
3034
- uses: actions/checkout@v3
3135
- uses: ./

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ function resolveHostPlatform() {
114114
if (osRelease.ID === "ubuntu") {
115115
const arch = normalizeArch(os.arch());
116116
return { suffix: `ubuntu${osRelease.VERSION_ID}_${arch}`, pkg: "tar.gz", arch };
117+
} else if (osRelease.ID === "amzn") {
118+
if (osRelease.VERSION_ID === "2") {
119+
const arch = normalizeArch(os.arch());
120+
return { suffix: `amazonlinux2_${arch}`, pkg: "tar.gz", arch };
121+
}
117122
}
123+
throw new Error(`Unsupported Linux distribution: ${osRelease.ID} ${osRelease.VERSION_ID}`);
118124
} else if (platform === "macos") {
119125
const arch = normalizeArch(os.arch());
120126
return { suffix: `macos_${arch}`, pkg: "pkg", arch };

0 commit comments

Comments
 (0)