Skip to content

Commit

Permalink
Remove erroneous backticks in linker flags (#1861) (#1862)
Browse files Browse the repository at this point in the history
When replacing the tag command with an environment variable, the
surrounding backticks were not removed.

This was not caught during testing because the script did not return
a non-zero exit code, even though an error had occurred. Add a set
line to prevent similar errors from going undetected in the future.

(cherry picked from commit 658a408)
  • Loading branch information
zjs authored Jun 29, 2018
1 parent 93b4b55 commit f2fdac7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion installer/scripts/version-linker-flags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e -o pipefail +h && [ -n "$DEBUG" ] && set -x

echo "-s -w \
-X github.com/vmware/vic-product/installer/pkg/version.Version=`${TAG}` \
-X github.com/vmware/vic-product/installer/pkg/version.Version=${TAG} \
-X github.com/vmware/vic-product/installer/pkg/version.BuildNumber=\"${BUILD_NUMBER}\" \
-X github.com/vmware/vic-product/installer/pkg/version.BuildDate=`date -u +%Y/%m/%d@%H:%M:%S` \
-X github.com/vmware/vic-product/installer/pkg/version.GitCommit=`git rev-parse --short HEAD` \
Expand Down

0 comments on commit f2fdac7

Please sign in to comment.