Browse Source

Update build_trojan-go.sh

Teddysun 5 years ago
parent
commit
0573235486
1 changed files with 3 additions and 1 deletions
  1. 3 1
      docker/trojan-go/build_trojan-go.sh

+ 3 - 1
docker/trojan-go/build_trojan-go.sh

@@ -19,7 +19,9 @@ for CMD in "${COMMANDS[@]}"; do
 done
 
 cd ${cur_dir}
-git clone https://github.com/p4gefau1t/trojan-go.git
+version=$(wget --no-check-certificate -qO- https://api.github.com/repos/p4gefau1t/trojan-go/tags | grep 'name' | cut -d\" -f4 | head -1)
+echo "git clone -b ${version} https://github.com/p4gefau1t/trojan-go.git"
+git clone -b ${version} https://github.com/p4gefau1t/trojan-go.git
 cd trojan-go || exit 2
 
 PACKAGE_NAME="github.com/p4gefau1t/trojan-go"