From 8d9aab5217028595dfbcc83c49b567eb9f68c9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20=22Pisco=22=20Fernandes?= Date: Wed, 10 Jan 2024 18:01:10 +0000 Subject: [PATCH] TUN-8140: Remove homebrew scripts ## Summary We have decided to no longer push cloudflared to cloudflare homebrew, and use the automation from homebrew-core to update cloudflared on their repository. Therefore, the scripts for homebrew and makefile targets are no longer necessary. --- .teamcity/update-homebrew-core.sh | 26 ------------ .teamcity/update-homebrew.sh | 66 ------------------------------- Makefile | 9 ----- cfsetup.yaml | 10 ----- 4 files changed, 111 deletions(-) delete mode 100755 .teamcity/update-homebrew-core.sh delete mode 100755 .teamcity/update-homebrew.sh diff --git a/.teamcity/update-homebrew-core.sh b/.teamcity/update-homebrew-core.sh deleted file mode 100755 index e3b982a3..00000000 --- a/.teamcity/update-homebrew-core.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -if ! VERSION="$(git describe --tags --exact-match 2>/dev/null)" ; then - echo "Skipping public release for an untagged commit." - echo "##teamcity[buildStatus status='SUCCESS' text='Skipped due to lack of tag']" - exit 0 -fi - -if [[ "${HOMEBREW_GITHUB_API_TOKEN:-}" == "" ]] ; then - echo "Missing GITHUB_API_TOKEN" - exit 1 -fi - -# "install" Homebrew -git clone https://github.com/Homebrew/brew tmp/homebrew -eval "$(tmp/homebrew/bin/brew shellenv)" -brew update --force --quiet -chmod -R go-w "$(brew --prefix)/share/zsh" - -git config --global user.name "cloudflare-warp-bot" -git config --global user.email "warp-bot@cloudflare.com" - -# bump formula pr -brew bump-formula-pr cloudflared --version="$VERSION" --no-browse --no-audit diff --git a/.teamcity/update-homebrew.sh b/.teamcity/update-homebrew.sh deleted file mode 100755 index f228b78a..00000000 --- a/.teamcity/update-homebrew.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -FILENAME="${PWD}/artifacts/cloudflared-darwin-amd64.tgz" -if ! VERSION="$(git describe --tags --exact-match 2>/dev/null)" ; then - echo "Skipping public release for an untagged commit." - echo "##teamcity[buildStatus status='SUCCESS' text='Skipped due to lack of tag']" - exit 0 -fi - -if [[ ! -f "$FILENAME" ]] ; then - echo "Missing $FILENAME" - exit 1 -fi - -if [[ "${GITHUB_PRIVATE_KEY_B64:-}" == "" ]] ; then - echo "Missing GITHUB_PRIVATE_KEY_B64" - exit 1 -fi - -# upload to s3 bucket for use by Homebrew formula -s3cmd \ - --acl-public --access_key="$AWS_ACCESS_KEY_ID" --secret_key="$AWS_SECRET_ACCESS_KEY" --host-bucket="%(bucket)s.s3.cfdata.org" \ - put "$FILENAME" "s3://cftunnel-docs/dl/cloudflared-$VERSION-darwin-amd64.tgz" -s3cmd \ - --acl-public --access_key="$AWS_ACCESS_KEY_ID" --secret_key="$AWS_SECRET_ACCESS_KEY" --host-bucket="%(bucket)s.s3.cfdata.org" \ - cp "s3://cftunnel-docs/dl/cloudflared-$VERSION-darwin-amd64.tgz" "s3://cftunnel-docs/dl/cloudflared-stable-darwin-amd64.tgz" -SHA256=$(sha256sum "$FILENAME" | cut -b1-64) - -# set up git (note that UserKnownHostsFile is an absolute path so we can cd wherever) -mkdir -p tmp -ssh-keyscan -t rsa github.com > tmp/github.txt -echo "$GITHUB_PRIVATE_KEY_B64" | base64 --decode > tmp/private.key -chmod 0400 tmp/private.key -export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=$PWD/tmp/github.txt -i $PWD/tmp/private.key -o IdentitiesOnly=yes" - -# clone Homebrew repo into tmp/homebrew-cloudflare -git clone git@github.com:cloudflare/homebrew-cloudflare.git tmp/homebrew-cloudflare -cd tmp/homebrew-cloudflare -git checkout -f master -git reset --hard origin/master - -# modify cloudflared.rb -URL="https://packages.argotunnel.com/dl/cloudflared-$VERSION-darwin-amd64.tgz" -tee cloudflared.rb <