diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index 16db3a967..95712e499 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -7,7 +7,7 @@ packages: - jq secrets: - 6c60aaee-92e7-4e7d-812c-114817689b4d - - 2cd8c203-ba06-4504-be49-1e2b9b71efdd + - dd0bd962-7664-4d3e-b0f3-41c9ee96b8b8 sources: - https://github.com/ziglang/zig tasks: diff --git a/ci/azure/on_master_success b/ci/azure/on_master_success index 5354fb065..cef618361 100755 --- a/ci/azure/on_master_success +++ b/ci/azure/on_master_success @@ -1,6 +1,8 @@ #!/bin/sh -set -x +# We do not set -x because this would leak the oauth access token. +set +x + set -e sudo apt-get update -y diff --git a/ci/azure/pipelines.yml b/ci/azure/pipelines.yml index 8ce9d8d01..d2cd30cc7 100644 --- a/ci/azure/pipelines.yml +++ b/ci/azure/pipelines.yml @@ -44,7 +44,7 @@ jobs: - script: ci/azure/windows_script.bat name: main displayName: 'Build and test' -- job: UpdateDownloadPage +- job: OnMasterSuccess dependsOn: - BuildMacOS - BuildLinux diff --git a/ci/drone/linux_script b/ci/drone/linux_script index 03bf0a3e5..7db505474 100755 --- a/ci/drone/linux_script +++ b/ci/drone/linux_script @@ -61,6 +61,9 @@ if [ -z "$DRONE_PULL_REQUEST" ]; then s3cmd put -P --add-header="Cache-Control: max-age=0, must-revalidate" "$JSONFILE" "s3://ziglang.org/builds/$JSONFILE" s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/$TRIPLEARCH-linux-$VERSION.json" if [ "$GITBRANCH" = "master" ]; then + # avoid leaking oauth token + set +x + cd "$BUILDDIR" ./ci/srht/on_master_success "$VERSION" "$SRHT_OAUTH_TOKEN" fi diff --git a/ci/srht/freebsd_script b/ci/srht/freebsd_script index 8e717e4ba..a2f4431d7 100755 --- a/ci/srht/freebsd_script +++ b/ci/srht/freebsd_script @@ -88,6 +88,9 @@ if [ -f ~/.s3cfg ]; then s3cmd put -P "$JSONFILE" "s3://ziglang.org/builds/x86_64-freebsd-$VERSION.json" if [ "$GITBRANCH" = "master" ]; then + # avoid leaking oauth token + set +x + OAUTH_TOKEN="$(cat ~/.oauth_token)" cd "$ZIGDIR" ./ci/srht/on_master_success "$VERSION" "$OAUTH_TOKEN" diff --git a/ci/srht/on_master_success b/ci/srht/on_master_success index 7638ec70d..a42e63c80 100755 --- a/ci/srht/on_master_success +++ b/ci/srht/on_master_success @@ -6,7 +6,9 @@ # * jq # * cat -set -x +# We do not set -x because this would leak the oauth access token. +set +x + set -e VERSION="$1"