aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-11-05 01:32:21 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-11-05 01:32:21 -0500
commitdc2dfef0a22dba646c87fd94ff421fa85fd79493 (patch)
treeb2a8556f5e7e515b0509bdae3f7173038a7c63e1
parentcaf1ec94747ca3c5cae6f9a21b25d1a6c350bbb7 (diff)
downloadzig-dc2dfef0a22dba646c87fd94ff421fa85fd79493.tar.gz
zig-dc2dfef0a22dba646c87fd94ff421fa85fd79493.zip
ci: upload a src tarball too
-rw-r--r--ci/azure/pipelines.yml2
-rwxr-xr-xci/azure/update_download_page18
2 files changed, 17 insertions, 3 deletions
diff --git a/ci/azure/pipelines.yml b/ci/azure/pipelines.yml
index 5315de705f..37fce2a27a 100644
--- a/ci/azure/pipelines.yml
+++ b/ci/azure/pipelines.yml
@@ -50,6 +50,8 @@ jobs:
- BuildLinux
- BuildWindows
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
+ strategy:
+ maxParallel: 1
pool:
vmImage: 'ubuntu-16.04'
variables:
diff --git a/ci/azure/update_download_page b/ci/azure/update_download_page
index 43eb3f4b0a..2fce1a4d26 100755
--- a/ci/azure/update_download_page
+++ b/ci/azure/update_download_page
@@ -3,12 +3,23 @@
set -x
set -e
+SRCDIR=$(pwd)
+rm -rf .git
+sudo apt-get install -y s3cmd
+
cd "$HOME"
wget "https://ziglang.org/builds/$LINUX_TARBALL"
tar xf $LINUX_TARBALL
-rm $LINUX_TARBALL
-ZIG="$(ls zig-*)/zig"
-LANGREF="$(ls zig-*)/langref.html"
+ZIGDIR=$(basename -s .tar.xz $LINUX_TARBALL)
+ZIG="$ZIGDIR/zig"
+LANGREF="$ZIGDIR/langref.html"
+VERSION=$($ZIG version)
+SRCTARBALLDIR="zig-$VERSION"
+export SRC_TARBALL="$SRCTARBALLDIR.tar.xz"
+mv "$SRCDIR" "$SRCTARBALLDIR"
+tar cfJ "$SRC_TARBALL" "$SRCTARBALLDIR"
+export SRC_SHASUM=$(sha256sum $SRC_TARBALL | cut '-d ' -f1)
+export SRC_BYTESIZE=$(wc -c < $SRC_TARBALL)
git clone https://github.com/ziglang/www.ziglang.org --depth 1
cd www.ziglang.org
@@ -16,5 +27,6 @@ export MASTER_DATE=$(date +%Y-%m-%d)
"$ZIG" run update-download-page.zig
mv "$DOWNLOADSECUREFILE_SECUREFILEPATH" "$HOME/.s3cfg"
+s3cmd put -P "$SRC_TARBALL" s3://ziglang.org/builds/
s3cmd put -P "$LANGREF" s3://ziglang.org/documentation/master/index.html --add-header="Cache-Control: max-age=0, must-revalidate"
s3cmd put -P www/download/index.html s3://ziglang.org/download/index.html --add-header="Cache-Control: max-age=0, must-revalidate"