From c94c212e97844e516d4037948e582d24d559fff7 Mon Sep 17 00:00:00 2001 From: Matt Keeler Date: Mon, 18 Jun 2018 10:07:29 -0400 Subject: [PATCH] Fix a bug in parse_version that prevented using auxillary version files --- build-support/functions/10-util.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-support/functions/10-util.sh b/build-support/functions/10-util.sh index 57b542b36..4bc3d2567 100644 --- a/build-support/functions/10-util.sh +++ b/build-support/functions/10-util.sh @@ -141,9 +141,9 @@ function parse_version { # try to determine the version if we have build tags for tag in "$GOTAGS" do - for vfile in $(ls "${1}/version/version_*.go" 2> /dev/null| sort) + for vfile in $(find "${1}/version" -name "version_*.go" 2> /dev/null| sort) do - if grep -q "// +build $tag" $file + if grep -q "// +build $tag" "${vfile}" then version_main=$(awk '$1 == "Version" && $2 == "=" { gsub(/"/, "", $3); print $3 }' < ${vfile}) release_main=$(awk '$1 == "VersionPrerelease" && $2 == "=" { gsub(/"/, "", $3); print $3 }' < ${vfile})