checkout-latest-tag: Exit with error in the case of any failures

This commit is contained in:
Jeff Epler 2023-11-21 08:45:30 -06:00
parent 5fd8630654
commit 83333ac1f8
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

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