Skip to content

Commit

Permalink
build-aux: simplify release.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Biesek <[email protected]>
  • Loading branch information
michalbiesek committed Aug 7, 2023
1 parent 7355aa9 commit f6b9541
Showing 1 changed file with 10 additions and 32 deletions.
42 changes: 10 additions & 32 deletions build-aux/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,41 +57,19 @@ cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-amd64-disable-systemd

rm -rf result

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-arm64.nix
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-arm64

rm -rf result

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-arm64.nix --arg enableSystemd false
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-arm64-disable-systemd

rm -rf result

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-ppc64le.nix
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-ppc64le

rm -rf result

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-ppc64le.nix --arg enableSystemd false
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-ppc64le-disable-systemd

rm -rf result
for ARCH in arm64 ppc64le riscv64; do
$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-${ARCH}.nix
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH}

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-riscv64.nix
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-riscv64
rm -rf result

rm -rf result
$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-${ARCH}.nix --arg enableSystemd false
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-${ARCH}-disable-systemd

$RUNTIME run --rm $RUNTIME_EXTRA_ARGS --privileged -v /nix:/nix -v ${PWD}:${PWD} -w ${PWD} ${NIX_IMAGE} \
nix $NIX_ARGS build --file nix/default-riscv64.nix --arg enableSystemd false
cp ./result/bin/crun $OUTDIR/crun-$VERSION-linux-riscv64-disable-systemd

rm -rf result
rm -rf result
done

if test x$SKIP_GPG = x; then
for i in $OUTDIR/*; do
Expand Down

0 comments on commit f6b9541

Please sign in to comment.