# Pastebin nvi3aI7B override-pull: | snapcraftctl pull last_committed_tag="$(git describe --tags --abbrev=0)" last_released_tag="$(snap info $SNAPCRAFT_PROJECT_NAME | awk '$1 == "beta:" { print $2 }')" # If the latest tag from the upstream project has not been released to # beta, build that tag instead of master. if [ "${last_committed_tag}" != "${last_released_tag}" ]; then git fetch git checkout "${last_committed_tag}" snapcraftctl set-version "${last_committed_tag}" else snapcraftctl set-version "$(git rev-parse --short HEAD)" fi