Skip to content

Commit 844dbf9

Browse files
Merge pull request #69 from swiftwasm/katei/support-amazonlinux2
Support amazonlinux2
2 parents 38bb30a + ed0a01c commit 844dbf9

File tree

6 files changed

+24
-2
lines changed

6 files changed

+24
-2
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: swift:amazonlinux2
2831
runs-on: ${{ matrix.os }}
32+
container: ${{ matrix.container }}
2933
steps:
3034
- uses: actions/checkout@v3
3135
- uses: ./

dist/index.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/nightly/index.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/nightly/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)