Skip to content

Commit 35b3bda

Browse files
committed
Replace discouraged command substitution syntax in deploy script
The previous backticks command substitution syntax is discouraged in favor of the modern `$()` syntax for the reasons described here: http://mywiki.wooledge.org/BashFAQ/082
1 parent b3f973d commit 35b3bda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

deploy.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash -xe
2-
GIT_REV=`git log --pretty=format:'%h' -n 1`
3-
BUILD_DATE=`date +%Y-%m-%d:%H:%M:%S`
4-
COMPILEINFO=`echo +$GIT_REV+$BUILD_DATE | tr -d '"'`
2+
GIT_REV="$(git log --pretty=format:'%h' -n 1)"
3+
BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)"
4+
COMPILEINFO="$(echo +$GIT_REV+$BUILD_DATE | tr -d '"')"
55

6-
VERSION=`cat main.go| grep "const AppVersion" |cut -f4 -d " " | tr -d '"'`
6+
VERSION="$(cat main.go| grep "const AppVersion" |cut -f4 -d " " | tr -d '"')"
77

88
#Remember to set GOROOT accordingly with your installation
99

0 commit comments

Comments
 (0)