/
githubmirror
/
libmodulemd
Обзор
Документация
Войти
/
githubmirror
/
libmodulemd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
libmodulemd-2.9.3
modulemd/tests/test-version.sh
35 строк
772 B
Stephen Gallagher
Add version check test
13 фев 2020, 01:30
13 фев 2020, 01:30
af8f03d
Код
Авторство
О чём код?
#!/usr/bin/bash set -x SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" pushd $MESON_BUILD_ROOT function error_out { local code message local "${@}" echo $message 1>&2 exit $code } function common_finalize { exitcode=$? return $exitcode } trap common_finalize EXIT jq --version >/dev/null || error_out code=127 message="Install 'jq' to use this script" # Get the previous tag for this branch OLDTAG=$(git describe --first-parent --abbrev=0) # Get the version that will be tagged NEWVERSION=$(meson introspect $MESON_BUILD_ROOT --projectinfo |jq -r .version) NEWTAG=libmodulemd-$NEWVERSION if [ $NEWTAG = $OLDTAG ]; then error_out code=2 message="Version is already tagged. Update meson.build with the new version." fi