diff --git a/tools/git-checkout-latest-tag.sh b/tools/git-checkout-latest-tag.sh index 69fa2ced4f..243e52efda 100755 --- a/tools/git-checkout-latest-tag.sh +++ b/tools/git-checkout-latest-tag.sh @@ -1,8 +1,11 @@ #!/bin/bash +set -eo pipefail + # SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors) # # SPDX-License-Identifier: MIT git fetch --tags -git checkout $(git describe --tags `git rev-list --tags --max-count=1`) +latest_tag="$(git describe --tags `git rev-list --tags --max-count=1`)" +git checkout $latest_tag