From 713c91ee6140716f7687b2e2cf262a6af05a32ba Mon Sep 17 00:00:00 2001 From: Alessio Date: Sun, 12 Dec 2021 19:43:35 -0800 Subject: [PATCH] Screen for being on a release branch before doing the version bump test in CI build --- .build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.build.yml b/.build.yml index cc55b35..5cbb12b 100644 --- a/.build.yml +++ b/.build.yml @@ -98,15 +98,23 @@ tasks: - version_bump_test: | SECONDS=0 + cd twitter_offline_engine/cmd + + version=$(git branch --show-current | grep -Poh "(?<=^release-)\d+\.\d+\.\d+") || true + if [[ -z "$version" ]] + then + # Not on a release branch; just exit this task + exit + fi + sudo apt install -y curl gnupg - sudo curl https://apt.playfulpachyderm.com/KEY.gpg | apt-key add - + curl https://apt.playfulpachyderm.com/KEY.gpg | sudo apt-key add - sudo echo "deb https://apt.playfulpachyderm.com/ ./" > /etc/apt/sources.list.d/offline_twitter.list sudo apt update sudo apt install -y offline-twitter-engine # Latest released version which twitter # Ensure that it got installed - cd twitter_offline_engine/cmd twitter create_profile outdated_profile cd outdated_profile