mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-23 21:45:46 +03:00
Closes #557: Travis deploy
This commit is contained in:
parent
0161509b5f
commit
4b4cb99b30
3 changed files with 54 additions and 19 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -2,9 +2,11 @@
|
|||
/.vscode
|
||||
/.idea
|
||||
/AdGuardHome
|
||||
/AdGuardHome.exe
|
||||
/AdGuardHome.yaml
|
||||
/data/
|
||||
/build/
|
||||
/dist/
|
||||
/client/node_modules/
|
||||
/querylog.json
|
||||
/querylog.json.1
|
||||
|
@ -13,4 +15,4 @@
|
|||
|
||||
# Test output
|
||||
dnsfilter/tests/top-1m.csv
|
||||
dnsfilter/tests/dnsfilter.TestLotsOfRules*.pprof
|
||||
dnsfilter/tests/dnsfilter.TestLotsOfRules*.pprof
|
46
.travis.yml
46
.travis.yml
|
@ -1,15 +1,9 @@
|
|||
language: go
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- 1.11.x
|
||||
- 1.x
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/go-build
|
||||
- $HOME/gopath/pkg/mod
|
||||
- $HOME/Library/Caches/go-build
|
||||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
@ -21,6 +15,12 @@ before_install:
|
|||
install:
|
||||
- npm --prefix client install
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cache/go-build
|
||||
- $HOME/gopath/pkg/mod
|
||||
- $HOME/Library/Caches/go-build
|
||||
|
||||
script:
|
||||
- node -v
|
||||
- npm -v
|
||||
|
@ -31,4 +31,34 @@ script:
|
|||
- make
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# Release build configuration
|
||||
- name: release
|
||||
go:
|
||||
- 1.11.x
|
||||
os:
|
||||
- linux
|
||||
|
||||
script:
|
||||
- node -v
|
||||
- npm -v
|
||||
# Run tests just in case
|
||||
- go test -race -v -bench=. ./...
|
||||
# Prepare releases
|
||||
- ./release.sh
|
||||
- ls -l dist
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
file:
|
||||
- dist/AdGuardHome_*
|
||||
on:
|
||||
repo: AdguardTeam/AdGuardHome
|
||||
tags: true
|
||||
draft: true
|
||||
file_glob: true
|
||||
skip_cleanup: true
|
23
release.sh
23
release.sh
|
@ -9,23 +9,26 @@ version=`git describe --abbrev=4 --dirty --always --tags`
|
|||
f() {
|
||||
make cleanfast; CGO_DISABLED=1 make
|
||||
if [[ $GOOS == darwin ]]; then
|
||||
rm -f ../AdGuardHome_"$version"_MacOS.zip
|
||||
zip ../AdGuardHome_"$version"_MacOS.zip AdGuardHome README.md LICENSE.TXT
|
||||
zip dist/AdGuardHome_"$version"_MacOS.zip AdGuardHome README.md LICENSE.txt
|
||||
elif [[ $GOOS == windows ]]; then
|
||||
rm -f ../AdGuardHome_"$version"_Windows.zip
|
||||
zip ../AdGuardHome_"$version"_Windows.zip AdGuardHome.exe README.md LICENSE.TXT
|
||||
zip dist/AdGuardHome_"$version"_Windows.zip AdGuardHome.exe README.md LICENSE.txt
|
||||
else
|
||||
pushd ..
|
||||
tar zcvf AdGuardHome_"$version"_"$GOOS"_"$GOARCH".tar.gz AdGuardHome/{AdGuardHome,LICENSE.TXT,README.md}
|
||||
popd
|
||||
tar zcvf dist/AdGuardHome_"$version"_"$GOOS"_"$GOARCH".tar.gz AdGuardHome README.md LICENSE.txt
|
||||
fi
|
||||
}
|
||||
|
||||
#make clean
|
||||
#make
|
||||
# Clean and rebuild both static and binary
|
||||
make clean
|
||||
make
|
||||
|
||||
# Prepare the dist folder
|
||||
rm -rf dist
|
||||
mkdir -p dist
|
||||
|
||||
# Prepare releases
|
||||
GOOS=darwin GOARCH=amd64 f
|
||||
GOOS=linux GOARCH=amd64 f
|
||||
GOOS=linux GOARCH=386 f
|
||||
GOOS=linux GOARCH=arm GOARM=6 f
|
||||
GOOS=linux GOARCH=arm64 GOARM=6 f
|
||||
GOOS=windows GOARCH=amd64 f
|
||||
GOOS=windows GOARCH=amd64 f
|
Loading…
Reference in a new issue