添加自动打包其他架构脚本
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a900f81019
commit
7644978e23
|
@ -43,10 +43,7 @@ steps:
|
|||
- sed -i 's?/favicon.ico?/static/favicon.ico?g' ./app/index.html
|
||||
- sed -i 's?/logo192.png?/static/logo192.png?g' ./app/index.html
|
||||
- sed -i 's?/manifest.json?/static/manifest.json?g' ./app/index.html
|
||||
- CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o /root/web/windows_amd64_main.exe
|
||||
- CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o /root/web/linux_arm64_main
|
||||
- CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -o /root/web/linux_arm_main
|
||||
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /root/web/linux_amd64_main
|
||||
- bash bulid.sh
|
||||
volumes:
|
||||
- name: outdir
|
||||
host:
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
CPU_architecture="darwin/amd64
|
||||
darwin/arm64
|
||||
freebsd/386
|
||||
freebsd/amd64
|
||||
freebsd/arm
|
||||
freebsd/arm64
|
||||
linux/386
|
||||
linux/amd64
|
||||
linux/arm
|
||||
linux/arm64
|
||||
linux/loong64
|
||||
linux/mips
|
||||
linux/mips64
|
||||
linux/mips64le
|
||||
linux/mipsle
|
||||
linux/ppc64
|
||||
linux/ppc64le
|
||||
linux/riscv64
|
||||
linux/s390x
|
||||
netbsd/386
|
||||
netbsd/amd64
|
||||
netbsd/arm
|
||||
netbsd/arm64
|
||||
openbsd/386
|
||||
openbsd/amd64
|
||||
openbsd/arm
|
||||
openbsd/arm64
|
||||
openbsd/mips64
|
||||
windows/386
|
||||
windows/amd64
|
||||
windows/arm
|
||||
windows/arm64"
|
||||
|
||||
for line in $CPU_architecture
|
||||
do
|
||||
array=(${line//\// })
|
||||
extension=""
|
||||
if [ "${array[0]}" == "windows" ];then
|
||||
extension=".exe"
|
||||
fi
|
||||
echo "Start compiling the system:${array[0]} architecture:${array[1]}"
|
||||
# echo "CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}"
|
||||
CGO_ENABLED=0 GOOS=${array[0]} GOARCH=${array[1]} go build -o /root/web/${array[0]}_${array[1]}_main${extension}
|
||||
done
|
Loading…
Reference in New Issue