Skip to content

Commit a4b9444

Browse files
authored
chore: download noctilucent instead of building it (#26258)
---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent d316af7 commit a4b9444

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

packages/aws-cdk/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ lib/vendor/noctilucent/*
4242
.DS_Store
4343

4444
junit.xml
45+
tmp/

packages/aws-cdk/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ junit.xml
3131

3232
generate.sh
3333
lib/vendor/noctilucent/Dockerfile
34+
tmp/

packages/aws-cdk/generate.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ HERE
1818
# Download noctilucent wasm-pack build
1919
NOCTILUCENT_VERSION=0.1.2
2020
PACK_URL=https://github.com/iph/noctilucent/releases/download/v${NOCTILUCENT_VERSION}/wasm-pack.zip
21+
zipfile=$PWD/tmp/noctilucent-wasm-${NOCTILUCENT_VERSION}.zip
2122
outdir=lib/vendor/noctilucent
2223

23-
mkdir -p $outdir
24-
(cd $outdir && curl -sSfLo wasm-pack.zip "$PACK_URL" && unzip -o wasm-pack.zip)
24+
mkdir -p tmp
25+
if [[ ! -f "$zipfile" ]]; then
26+
curl -sSfLo "$zipfile" "$PACK_URL"
27+
fi
28+
29+
(cd $outdir && unzip -qo $zipfile)
2530

2631
# Don't need these files
27-
rm $outdir/{.gitignore,README.md,package.json,wasm-pack.zip}
32+
rm -f $outdir/{.gitignore,README.md,package.json}

0 commit comments

Comments
 (0)