build: rm .git before xgo

pull/992/head
Xhofe 2022-04-24 16:53:47 +08:00
parent 42c0e438d5
commit 08aaa5e2c0
3 changed files with 5 additions and 4 deletions

View File

@ -32,8 +32,8 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
docker pull crazymax/xgo:1.18.0 docker pull techknowlogick/xgo:latest
go install github.com/crazy-max/xgo@v0.13.0 go install src.techknowlogick.com/xgo@latest
sudo apt install upx sudo apt install upx
- name: Build - name: Build

View File

@ -29,8 +29,8 @@ jobs:
- name: Install upx - name: Install upx
run: | run: |
docker pull crazymax/xgo:latest docker pull techknowlogick/xgo:latest
go install github.com/crazy-max/xgo@latest go install src.techknowlogick.com/xgo@latest
sudo apt install upx sudo apt install upx
- name: Build - name: Build

View File

@ -61,6 +61,7 @@ BUILD() {
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \ -X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \ -X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
" "
rm -rf .git/
if [ "$1" == "release" ]; then if [ "$1" == "release" ]; then
xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter . xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
else else