Skip to content

Commit

Permalink
Allow --version to overwrite addon version (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
einschmidt authored Dec 7, 2020
1 parent c60c59d commit 6362956
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,15 @@ function build_addon() {
name="$(jq --raw-output '.name // empty' "$TARGET/config.json" | sed "s/'//g")"
description="$(jq --raw-output '.description // empty' "$TARGET/config.json" | sed "s/'//g")"
url="$(jq --raw-output '.url // empty' "$TARGET/config.json")"
version="$(jq --raw-output '.version' "$TARGET/config.json")"
raw_image="$(jq --raw-output '.image // empty' "$TARGET/config.json")"
mapfile -t supported_arch < <(jq --raw-output '.arch // empty' "$TARGET/config.json")

# Read version from config.json when VERSION is not set
if [ -n "$VERSION" ]; then
version="$VERSION"
else
version="$(jq --raw-output '.version' "$TARGET/config.json")"
fi

# Check arch
if [[ ! ${supported_arch[*]} =~ ${build_arch} ]]; then
Expand Down

0 comments on commit 6362956

Please sign in to comment.