Skip to content

Instantly share code, notes, and snippets.

@gderaco
Created November 19, 2017 19:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gderaco/4b0b3b8047905b9617054214e022bd58 to your computer and use it in GitHub Desktop.
Save gderaco/4b0b3b8047905b9617054214e022bd58 to your computer and use it in GitHub Desktop.
#use this script to get the latest version +1 of an app on hockeyapp
#useful for fastlane like this appVersion = sh("sh hockeyapp_buildnumber_plus1.sh") increment_build_number( build_number: appVersion )
#requisites: jq ( https://stedolan.github.io/jq/ )
output=$(curl -s -H "X-HockeyAppToken: API_TOKEN" https://rink.hockeyapp.net/api/2/apps/APP_PUBLIC_ID/app_versions\?include_build_urls\=true\&page\=1 | jq '.app_versions[0].version' | sed "s/\"//g")
echo $(($output + 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment