ci: add FreeBSD to download page
This commit is contained in:
parent
b7fb63d696
commit
bf4701562c
@ -34,6 +34,16 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
|||||||
|
|
||||||
SHASUM=$(sha256sum $ARTIFACTSDIR/$TARBALL | cut '-d ' -f1)
|
SHASUM=$(sha256sum $ARTIFACTSDIR/$TARBALL | cut '-d ' -f1)
|
||||||
BYTESIZE=$(wc -c < $ARTIFACTSDIR/$TARBALL)
|
BYTESIZE=$(wc -c < $ARTIFACTSDIR/$TARBALL)
|
||||||
|
|
||||||
|
JSONFILE="linux-$GITBRANCH.json"
|
||||||
|
touch $JSONFILE
|
||||||
|
echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE
|
||||||
|
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
|
||||||
|
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
|
||||||
|
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/linux-$VERSION.json"
|
||||||
|
|
||||||
# `set -x` causes these variables to be mangled.
|
# `set -x` causes these variables to be mangled.
|
||||||
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
||||||
set +x
|
set +x
|
||||||
|
@ -91,6 +91,16 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
|||||||
|
|
||||||
SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1)
|
SHASUM=$(shasum -a 256 $TARBALL | cut '-d ' -f1)
|
||||||
BYTESIZE=$(wc -c < $TARBALL)
|
BYTESIZE=$(wc -c < $TARBALL)
|
||||||
|
|
||||||
|
JSONFILE="macos-$GITBRANCH.json"
|
||||||
|
touch $JSONFILE
|
||||||
|
echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE
|
||||||
|
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
|
||||||
|
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
|
||||||
|
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/macos-$VERSION.json"
|
||||||
|
|
||||||
# `set -x` causes these variables to be mangled.
|
# `set -x` causes these variables to be mangled.
|
||||||
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
||||||
set +x
|
set +x
|
||||||
|
@ -6,7 +6,7 @@ set -e
|
|||||||
SRCDIR=$(pwd)
|
SRCDIR=$(pwd)
|
||||||
rm -rf .git
|
rm -rf .git
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y s3cmd
|
sudo apt-get install -y s3cmd curl jq
|
||||||
|
|
||||||
cd "$HOME"
|
cd "$HOME"
|
||||||
wget "https://ziglang.org/builds/$LINUX_TARBALL"
|
wget "https://ziglang.org/builds/$LINUX_TARBALL"
|
||||||
@ -22,6 +22,12 @@ tar cfJ "$SRC_TARBALL" "$SRCTARBALLDIR"
|
|||||||
export SRC_SHASUM=$(sha256sum $SRC_TARBALL | cut '-d ' -f1)
|
export SRC_SHASUM=$(sha256sum $SRC_TARBALL | cut '-d ' -f1)
|
||||||
export SRC_BYTESIZE=$(wc -c < $SRC_TARBALL)
|
export SRC_BYTESIZE=$(wc -c < $SRC_TARBALL)
|
||||||
|
|
||||||
|
# the freebsd build has to be there too
|
||||||
|
FREEBSD_JSON=$(curl --fail "https://ziglang.org/builds/freebsd-$VERSION.json" || exit 1)
|
||||||
|
export FREEBSD_TARBALL=$(echo "$FREEBSD_JSON" | jq .tarball -r)
|
||||||
|
export FREEBSD_BYTESIZE=$(echo "$FREEBSD_JSON" | jq .size -r)
|
||||||
|
export FREEBSD_SHASUM=$(echo "$FREEBSD_JSON" | jq .shasum -r)
|
||||||
|
|
||||||
git clone https://github.com/ziglang/www.ziglang.org --depth 1
|
git clone https://github.com/ziglang/www.ziglang.org --depth 1
|
||||||
cd www.ziglang.org
|
cd www.ziglang.org
|
||||||
export MASTER_DATE=$(date +%Y-%m-%d)
|
export MASTER_DATE=$(date +%Y-%m-%d)
|
||||||
|
@ -25,6 +25,16 @@ if [ "${BUILD_REASON}" != "PullRequest" ]; then
|
|||||||
|
|
||||||
SHASUM=$(sha256sum $TARBALL | cut '-d ' -f1)
|
SHASUM=$(sha256sum $TARBALL | cut '-d ' -f1)
|
||||||
BYTESIZE=$(wc -c < $TARBALL)
|
BYTESIZE=$(wc -c < $TARBALL)
|
||||||
|
|
||||||
|
JSONFILE="windows-$GITBRANCH.json"
|
||||||
|
touch $JSONFILE
|
||||||
|
echo "{\"tarball\": \"$TARBALL\"," >>$JSONFILE
|
||||||
|
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
|
||||||
|
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
|
||||||
|
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/windows-$VERSION.json"
|
||||||
|
|
||||||
# `set -x` causes these variables to be mangled.
|
# `set -x` causes these variables to be mangled.
|
||||||
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
# See https://developercommunity.visualstudio.com/content/problem/375679/pipeline-variable-incorrectly-inserts-single-quote.html
|
||||||
set +x
|
set +x
|
||||||
|
@ -29,7 +29,7 @@ if [ -f ~/.s3cfg ]; then
|
|||||||
mv release/bin/zig release/
|
mv release/bin/zig release/
|
||||||
rmdir release/bin
|
rmdir release/bin
|
||||||
|
|
||||||
GITBRANCH=$(git rev-parse --abbrev-ref HEAD)
|
GITBRANCH=$(basename $GITHUB_REF)
|
||||||
VERSION=$(release/zig version)
|
VERSION=$(release/zig version)
|
||||||
DIRNAME="zig-freebsd-x86_64-$VERSION"
|
DIRNAME="zig-freebsd-x86_64-$VERSION"
|
||||||
TARBALL="$DIRNAME.tar.xz"
|
TARBALL="$DIRNAME.tar.xz"
|
||||||
@ -49,5 +49,6 @@ if [ -f ~/.s3cfg ]; then
|
|||||||
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
|
echo "\"shasum\": \"$SHASUM\"," >>$JSONFILE
|
||||||
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
|
echo "\"size\": \"$BYTESIZE\"}" >>$JSONFILE
|
||||||
|
|
||||||
s3cmd put -P "$JSONFILE" s3://ziglang.org/builds/$JSONFILE
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE"
|
||||||
|
s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/freebsd-$VERSION.json"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user