-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgen-bin.sh
executable file
·27 lines (26 loc) · 1012 Bytes
/
gen-bin.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
set -x
set -o errexit
rm -f dist/*.zip || true
mkdir -p dist/
version=$(./utils/version.ts)
for i in \
x86_64-unknown-linux-gnu,x86_64-linux \
x86_64-apple-darwin,x86_64-apple \
aarch64-apple-darwin,aarch64-apple \
x86_64-pc-windows-msvc,x86_64-windows ; do
IFS=","
set -- $i
deno compile --target $1 --allow-all --output dist/studio-pack-generator-$2 --unstable ./studio_pack_generator.ts --is-compiled
if [[ "$1" = "x86_64-pc-windows-msvc" ]] ; then
rm -rf dist/Studio-Pack-Generator
mkdir dist/Studio-Pack-Generator
cp -a tools/ dist/studio-pack-generator-x86_64-windows.exe dist/Studio-Pack-Generator/
(cd dist && zip -r studio-pack-generator-$version-x86_64-windows.zip Studio-Pack-Generator/)
rm dist/studio-pack-generator-x86_64-windows.exe
rm -rf dist/Studio-Pack-Generator
else
(cd dist && zip -r studio-pack-generator-$version-$2.zip studio-pack-generator-$2)
rm dist/studio-pack-generator-$2
fi
done