2019-12-27 01:00:10 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
DOCKER_IMAGE="$1"
|
|
|
|
shift
|
|
|
|
ARCH="$1"
|
|
|
|
|
|
|
|
BUILD_DIR=/tmp/static/
|
|
|
|
|
|
|
|
rm -rf "$BUILD_DIR"
|
|
|
|
mkdir -p "$BUILD_DIR"
|
|
|
|
cp * .ci/build.sh "$BUILD_DIR"
|
|
|
|
|
2020-01-03 00:20:05 -05:00
|
|
|
docker run --rm -v "$BUILD_DIR":/tmp "$DOCKER_IMAGE" /tmp/build.sh "$ARCH" || exit 1
|
2019-12-27 01:00:10 -05:00
|
|
|
|
2020-01-04 03:04:22 -05:00
|
|
|
mv "$BUILD_DIR"pegh.static.openssl "./pegh-linux-$ARCH-openssl"
|
|
|
|
mv "$BUILD_DIR"pegh.static.libsodium "./pegh-linux-$ARCH-libsodium"
|
|
|
|
mv "$BUILD_DIR"pegh.static.libsodium-openssl "./pegh-linux-$ARCH-libsodium-openssl"
|
2020-01-03 00:20:05 -05:00
|
|
|
|
|
|
|
mv "$BUILD_DIR"pegh-*.exe ./
|
|
|
|
|
2020-01-05 22:07:55 -05:00
|
|
|
sha256sum pegh-* > pegh-$ARCH-sha256sum.txt
|
|
|
|
|
|
|
|
if [ "$ARCH" == "amd64" ]
|
|
|
|
then
|
|
|
|
|
2020-01-04 03:04:22 -05:00
|
|
|
git archive HEAD -9 --format zip -o pegh-source.zip
|
|
|
|
git archive HEAD -9 --format tar.gz -o pegh-source.tar.gz
|
|
|
|
|
2020-01-05 22:07:55 -05:00
|
|
|
sha256sum pegh-source.* > pegh-source-sha256sum.txt
|
|
|
|
|
|
|
|
fi
|
2020-01-04 03:04:22 -05:00
|
|
|
|
2019-12-27 01:00:10 -05:00
|
|
|
rm -rf "$BUILD_DIR" 2>/dev/null
|
|
|
|
|
|
|
|
exit 0
|