Skip to content

Commit

Permalink
优化编译脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Oct 13, 2020
1 parent c54bb37 commit f5db28f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cd $SHELL_PATH

packr2

go build -ldflags "-s -w -X 'trojan/trojan.MVersion=`git describe --tags`' -X 'trojan/trojan.BuildDate=`date "+%Y%m%d-%H%M"`' -X 'trojan/trojan.GoVersion=`go version|awk '{print $3,$4}'`' -X 'trojan/trojan.GitVersion=`git rev-parse HEAD`'" -o "result/trojan" .
go build -ldflags "-s -w -X 'trojan/trojan.MVersion=`git describe --tags $(git rev-list --tags --max-count=1)`' -X 'trojan/trojan.BuildDate=`date "+%Y%m%d-%H%M"`' -X 'trojan/trojan.GoVersion=`go version|awk '{print $3,$4}'`' -X 'trojan/trojan.GitVersion=`git rev-parse HEAD`'" -o "result/trojan" .

cd result

Expand Down

0 comments on commit f5db28f

Please sign in to comment.