mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
commit
10fe5e3f80
17
.travis.yml
17
.travis.yml
@ -3,16 +3,27 @@ language: go
|
|||||||
go:
|
go:
|
||||||
- 1.13
|
- 1.13
|
||||||
|
|
||||||
|
arch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
- ppc64le
|
||||||
|
|
||||||
|
os:
|
||||||
|
- windows
|
||||||
|
- osx
|
||||||
|
- linux
|
||||||
|
|
||||||
env: GO111MODULE=on
|
env: GO111MODULE=on
|
||||||
|
|
||||||
script: GOARCH=amd64 go build -o webp-server-linux-amd64 webp-server.go
|
script:
|
||||||
|
- sh scripts/build.sh $TRAVIS_OS_NAME $TRAVIS_CPU_ARCH
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: $GITHUB_OAUTH_TOKEN
|
api_key: $GITHUB_OAUTH_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: builds/*
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
file:
|
|
||||||
- webp-server-linux-amd64
|
|
||||||
on:
|
on:
|
||||||
repo: webp-sh/webp_server_go
|
repo: webp-sh/webp_server_go
|
||||||
tags: true
|
tags: true
|
||||||
|
13
scripts/build.sh
Normal file
13
scripts/build.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CGO_ENABLED=0
|
||||||
|
|
||||||
|
if [ "${1}" == "windows" ]
|
||||||
|
then
|
||||||
|
go build -v -ldflags "-s -w" -o builds/webp-server-${1}-${2}.exe
|
||||||
|
else
|
||||||
|
go build -v -ldflags "-s -w" -o builds/webp-server-${1}-${2}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "build done!"
|
||||||
|
ls builds
|
@ -9,5 +9,5 @@ then
|
|||||||
elif [[ $platform =~ "x86_64" ]];then
|
elif [[ $platform =~ "x86_64" ]];then
|
||||||
go build -o webp-server-unix-amd64 webp-server.go
|
go build -o webp-server-unix-amd64 webp-server.go
|
||||||
else
|
else
|
||||||
go build -o webp-server-linux-i386 webp-server.go
|
go build -o webp-server-linux-amd64 webp-server.go
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user