2024-08-09 13:30:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
docker run --rm --privileged \
|
|
|
|
multiarch/qemu-user-static \
|
|
|
|
--reset -p yes
|
|
|
|
|
|
|
|
# Build for AMD64
|
|
|
|
docker build . -f Dockerfile.static -t tartrazine-builder
|
2024-08-28 21:47:20 +00:00
|
|
|
docker run -ti --rm -v "$PWD":/app --user="$UID" tartrazine-builder /bin/sh -c "cd /app && rm -rf lib shard.lock && shards build --static --release"
|
2024-08-09 13:30:20 +00:00
|
|
|
mv bin/tartrazine bin/tartrazine-static-linux-amd64
|
|
|
|
|
|
|
|
# Build for ARM64
|
|
|
|
docker build . -f Dockerfile.static --platform linux/arm64 -t tartrazine-builder
|
2024-08-28 21:47:20 +00:00
|
|
|
docker run -ti --rm -v "$PWD":/app --platform linux/arm64 --user="$UID" tartrazine-builder /bin/sh -c "cd /app && rm -rf lib shard.lock && shards build --static --release"
|
2024-08-09 13:30:20 +00:00
|
|
|
mv bin/tartrazine bin/tartrazine-static-linux-arm64
|