Skip to content

Commit

Permalink
bees
Browse files Browse the repository at this point in the history
  • Loading branch information
fables-tales committed Jun 28, 2023
1 parent 75fd784 commit 44f7439
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 23 additions & 19 deletions script/docker_release_linux
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,27 @@
set -euxo pipefail
TAG=$1
mkdir -p out
docker build -t "rubyfmt-release-linux:$(git rev-parse HEAD)" -f ./dockerfiles/build.Dockerfile ./.git
(
cat <<EOF
set -euxo pipefail
cd ~ &&
git clone rubyfmt.git/ ./rubyfmt &&
cd rubyfmt &&
git checkout $TAG &&
git submodule init &&
git submodule update &&
source /root/.cargo/env &&
find . | grep -i '\.rs$' | xargs -n 10 touch &&
./script/make_release &&
cp -r *.tar.gz /root/out &&
chmod 666 /root/out/*
platforms=("linux/amd64" "linux/arm64" "linux/arm/v7")

for platform in "${platforms[@]}"; do
docker build --platform "$platform" -f ./dockerfiles/build.Dockerfile -t "rubyfmt-release-linux-$platform:$(git rev-parse HEAD)" ./.git
(
cat <<EOF
set -euxo pipefail
cd ~ &&
git clone rubyfmt.git/ ./rubyfmt &&
cd rubyfmt &&
git checkout $TAG &&
git submodule init &&
git submodule update &&
source /root/.cargo/env &&
find . | grep -i '\.rs$' | xargs -n 10 touch &&
./script/make_release &&
cp -r *.tar.gz /root/out &&
chmod 666 /root/out/*
EOF
) > file
docker run --cpus=4 -it -v "$(pwd)/out:/root/out" "rubyfmt-release-linux:$(git rev-parse HEAD)" bash -c "$(cat file)"
mkdir -p "releases/$TAG"
cp out/*.tar.gz "releases/$TAG/"
) > file
docker run --platform=$platform --cpus=4 -it -v "$(pwd)/out:/root/out" "rubyfmt-release-linux-$platform:$(git rev-parse HEAD)" bash -c "$(cat file)"
mkdir -p "releases/$TAG"
cp out/*.tar.gz "releases/$TAG/"
done

0 comments on commit 44f7439

Please sign in to comment.