From 629b91da610e2567c5ce4df097e062c0b605ebc0 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 3 Nov 2019 14:20:35 -0500 Subject: [PATCH] ci: use heredoc and alpine/edge for faster sr.ht job --- ci/srht/on_master_success | 25 ++++++++++++++----------- ci/srht/update_download_page | 1 + 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ci/srht/on_master_success b/ci/srht/on_master_success index 0de916910961c75aa376fb41ec3c23838cedfcc6..7638ec70d819e4e2f697835394f80a1480ebb29a 100755 --- a/ci/srht/on_master_success +++ b/ci/srht/on_master_success @@ -4,6 +4,7 @@ # It assumes that the following things are installed: # * curl # * jq +# * cat set -x set -e @@ -12,17 +13,19 @@ VERSION="$1" OAUTH_TOKEN="$2" YML_FILE="tmp.yml" -echo "image: ubuntu/xenial" >> "$YML_FILE" -echo "packages:" >> "$YML_FILE" -echo " - s3cmd" >> "$YML_FILE" -echo " - curl" >> "$YML_FILE" -echo " - jq" >> "$YML_FILE" -echo "secrets:" >> "$YML_FILE" -echo " - 6c60aaee-92e7-4e7d-812c-114817689b4d" >> "$YML_FILE" -echo "sources:" >> "$YML_FILE" -echo " - https://github.com/ziglang/zig" >> "$YML_FILE" -echo "tasks:" >> "$YML_FILE" -echo " - build: cd zig && ./ci/srht/update_download_page $VERSION" >> "$YML_FILE" +cat <"$YML_FILE" +image: alpine/edge +packages: + - py3-pip + - curl + - jq +secrets: + - 6c60aaee-92e7-4e7d-812c-114817689b4d +sources: + - https://github.com/ziglang/zig +tasks: + - build: cd zig && ./ci/srht/update_download_page $VERSION +EOF jq <$YML_FILE -sR '{ "manifest": ., diff --git a/ci/srht/update_download_page b/ci/srht/update_download_page index 7e42d3a3bc17051f44ee4c4e857526874f11b61e..d27fb49bd0d25b237f83a907dcdab11dc537356f 100755 --- a/ci/srht/update_download_page +++ b/ci/srht/update_download_page @@ -23,6 +23,7 @@ curl --fail -I "$X86_64_WINDOWS_JSON_URL" || exit 0 curl --fail -I "$X86_64_MACOS_JSON_URL" || exit 0 curl --fail -I "$X86_64_FREEBSD_JSON_URL" || exit 0 +pip3 install s3cmd rm -rf .git cd "$HOME" -- 2.54.0