Screen for being on a release branch before doing the version bump test in CI build

This commit is contained in:
Alessio 2021-12-12 19:43:35 -08:00
parent 9357974a29
commit 713c91ee61

View File

@ -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