Skip to content
Snippets Groups Projects
Unverified Commit e3db1c17 authored by paulfantom's avatar paulfantom
Browse files

scripts: fail if version generator cannot retrieve currently used version

parent 8e5bf00c
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,12 @@ get_latest_version() { ...@@ -11,7 +11,12 @@ get_latest_version() {
# Get component version from version file # Get component version from version file
get_current_version() { get_current_version() {
echo >&2 "Reading currently used version of ${1}" echo >&2 "Reading currently used version of ${1}"
jq -r ".${1}" "$VERSION_FILE" v=$(jq -r ".${1}" "$VERSION_FILE")
if [ "${v}" == "" ]; then
echo >&2 "Couldn't read version of ${1} from $VERSION_FILE"
exit 1
fi
echo "$v"
} }
# Get version from online source and filter out unstable releases. In case of unstable release use what is set in version file # Get version from online source and filter out unstable releases. In case of unstable release use what is set in version file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment