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
run: |
docker pull crazymax/xgo:1.18.0
go install github.com/crazy-max/xgo@v0.13.0
docker pull techknowlogick/xgo:latest
go install src.techknowlogick.com/xgo@latest
sudo apt install upx
- name: Build

View File

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

View File

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