We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 183e9d4 commit 037e909Copy full SHA for 037e909
optimize_workspace.sh
@@ -13,12 +13,11 @@ echo -n "Building artifacts in workspace..."
13
echo "done."
14
15
echo -n "Optimizing artifacts in workspace..."
16
-# Start clean
17
-rm -rf ./artifacts
18
-mkdir artifacts
19
-# Optimize and postprocess artifacts
+mkdir -p artifacts
+TMPDIR=$(mktemp -d artifacts.XXX)
+# Optimize artifacts
20
(
21
- cd artifacts
+ cd "$TMPDIR"
22
23
for WASM in ../target/wasm32-unknown-unknown/release/*/*.wasm
24
do
@@ -28,6 +27,12 @@ mkdir artifacts
28
27
chmod -x "$BASE"
29
30
done
+ mv "*.wasm" ../artifacts
31
+)
32
+# Postprocess artifacts
33
+(
34
+ cd artifacts
35
sha256sum -- *.wasm >checksums.txt
36
)
37
+rm -rf "$TMPDIR"
38
0 commit comments