-
Notifications
You must be signed in to change notification settings - Fork 81
/
.travis.yml
53 lines (43 loc) · 1.53 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: go
go:
- "1.10"
before_install:
- go get github.com/Kisesy/gscan_quic
- sudo apt-get install p7zip-full
script:
- export CGO_ENABLED=0
- export EXE=gscan_quic
- export TAR_EXCLUDE="--exclude=*.go --exclude=*.bz2 --exclude=*.7z --exclude=*.xz --exclude=vendor"
- echo ${TRAVIS_TAG} > Version.txt
- export GOOS=windows GOARCH=386 && go build -ldflags "-w -s"
- 7za a ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.7z -ms=on -mx=9 -r- -mmt -x'!*.go' -x'!*.7z' -x'!*.zip' -x'!vendor/' *
- rm *.exe
- export GOOS=windows GOARCH=amd64 && go build -ldflags "-w -s"
- 7za a ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.7z -ms=on -mx=9 -r- -mmt -x'!*.go' -x'!*.7z' -x'!*.zip' -x'!vendor/' *
- rm *.exe
- export GOOS=linux GOARCH=386 XZ_OPT=-9 && go build -ldflags "-w -s"
- tar cvJpf ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.tar.xz * ${TAR_EXCLUDE}
- export GOOS=linux GOARCH=amd64 XZ_OPT=-9 && go build -ldflags "-w -s"
- tar cvJpf ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.tar.xz * ${TAR_EXCLUDE}
- export GOOS=linux GOARCH=arm && go build -ldflags "-w -s"
- tar cjf ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.tar.bz2 * ${TAR_EXCLUDE}
- export GOOS=darwin GOARCH=amd64 && go build -ldflags "-w -s"
- tar cjf ${EXE}_${GOOS}_${GOARCH}-${TRAVIS_TAG}.tar.bz2 * ${TAR_EXCLUDE}
- md5sum *.7z *.xz *.bz2 | tee md5sum
- sha1sum *.7z *.xz *.bz2 | tee sha1sum
deploy:
provider: releases
api_key:
secure: ${TOKEN}
file_glob: true
file:
- "*.7z"
- "*.xz"
- "*.bz2"
- "md5sum"
- "sha1sum"
skip_cleanup: true
on:
tags: true
notifications:
email: false