Skip to content

Commit 162d79c

Browse files
committed
Remove unnecessary cat from version parsing command
The deploy script contains a fairly complex command used to parse the code to get the current version. This command used `cat` to pipe the contents of the file to `grep`. But `grep` has a filename argument, so this was unnecessary. More information: https://github.com/koalaman/shellcheck/wiki/SC2002
1 parent b63ef47 commit 162d79c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GIT_REV="$(git log --pretty=format:'%h' -n 1)"
33
BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)"
44
COMPILEINFO="$(echo "+${GIT_REV}+${BUILD_DATE}" | tr -d '"')"
55

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

88
#Remember to set GOROOT accordingly with your installation
99

0 commit comments

Comments
 (0)