Skip to content

Commit

Permalink
Remove erroneous backticks in linker flags
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.
  • Loading branch information
zjs committed Jun 29, 2018
1 parent 0be2645 commit 825b8db
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 825b8db

Please sign in to comment.