Skip to content

Commit

Permalink
Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
palfrey committed Jan 3, 2024
1 parent 980ff98 commit 6f95fe8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ target/
test.db
server.*
privkey.pem
*.jpg
*.jpg
wait-for-db-linux*
25 changes: 25 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -eux -o pipefail

if [ ! -f /proc/sys/fs/binfmt_misc/qemu-aarch64 ]; then
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
fi

docker rm wait_for_db || true

if [ ! -f wait-for-db-linux-amd64 ]; then
docker buildx build --platform linux/amd64 --build-arg HOST=x86_64-unknown-linux-musl --tag wait_for_db --output=type=docker .
docker run --platform linux/amd64 --name wait_for_db wait_for_db --help
docker cp wait_for_db:/wait_for_db wait-for-db-linux-amd64
docker stop wait_for_db
docker rm wait_for_db
fi

if [ ! -f wait-for-db-linux-arm64 ]; then
docker buildx build --platform linux/arm64 --build-arg HOST=aarch64-unknown-linux-musl --tag wait_for_db --output=type=docker .
docker run --platform linux/arm64 --name wait_for_db wait_for_db --help
docker cp wait_for_db:/wait_for_db wait-for-db-linux-arm64
docker stop wait_for_db
docker rm wait_for_db
fi

0 comments on commit 6f95fe8

Please sign in to comment.