diff --git a/.gitignore b/.gitignore index f8e86c54..b4047c5b 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3d1380e0..6d690463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -78,6 +78,4 @@ matrix: - docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD" - ./build_docker.sh after_script: - - docker images - - \ No newline at end of file + - docker images diff --git a/README.md b/README.md index 64fa5bc0..6280333a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ Go Report Card + + GolangCI + Latest release diff --git a/release.sh b/release.sh index 80df5c8c..94cda10b 100755 --- a/release.sh +++ b/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 \ No newline at end of file