Skip to content

Commit

Permalink
编译前先清理早前已编译好了的程序
Browse files Browse the repository at this point in the history
  • Loading branch information
TruthHun committed May 22, 2023
1 parent ba07496 commit a7f7c28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ clean-api-go:
rm -rf api/*/*.go

builddarwin:
rm -rf release/${VERSION}/darwin
GOOS=darwin GOARCH=amd64 go build -v -o release/${VERSION}/darwin/moredoc -ldflags ${LDFLAGS}
cp -r dist release/${VERSION}/darwin
cp -r dictionary release/${VERSION}/darwin
Expand All @@ -60,6 +61,7 @@ builddarwin:
cd release/${VERSION}/darwin/ && tar -zcvf ../moredoc_ce_${VERSION}_darwin_amd64.tar.gz ./* && cd ../../

buildlinux:
rm -rf release/${VERSION}/linux
GOOS=linux GOARCH=amd64 go build -v -o release/${VERSION}/linux/moredoc -ldflags ${LDFLAGS}
cp -r dist release/${VERSION}/linux
cp -r dictionary release/${VERSION}/linux
Expand All @@ -69,6 +71,7 @@ buildlinux:
cd release/${VERSION}/linux/ && tar -zcvf ../moredoc_ce_${VERSION}_linux_amd64.tar.gz ./* && cd ../../

buildwin:
rm -rf release/${VERSION}/windows
GOOS=windows GOARCH=amd64 go build -v -o release/${VERSION}/windows/moredoc.exe -ldflags ${LDFLAGS}
cp -r dist release/${VERSION}/windows
cp -r dictionary release/${VERSION}/windows
Expand All @@ -78,6 +81,7 @@ buildwin:
cd release/${VERSION}/windows/ && tar -zcvf ../moredoc_ce_${VERSION}_windows_amd64.tar.gz ./* && cd ../../

buildlinuxarm:
rm -rf release/${VERSION}/linux-arm
GOOS=linux GOARCH=arm64 go build -v -o release/${VERSION}/linux-arm/moredoc -ldflags ${LDFLAGS}
cp -r dist release/${VERSION}/linux-arm
cp -r dictionary release/${VERSION}/linux-arm
Expand All @@ -87,6 +91,7 @@ buildlinuxarm:
cd release/${VERSION}/linux-arm/ && tar -zcvf ../moredoc_ce_${VERSION}_linux_arm64.tar.gz ./* && cd ../../

buildwinarm:
rm -rf release/${VERSION}/windows-arm
GOOS=windows GOARCH=arm64 go build -v -o release/${VERSION}/windows-arm/moredoc.exe -ldflags ${LDFLAGS}
cp -r dist release/${VERSION}/windows-arm
cp -r dictionary release/${VERSION}/windows-arm
Expand Down

0 comments on commit a7f7c28

Please sign in to comment.