From 9d37f3d9290f456954c3fa55df545ee9f40efbbf Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Mon, 16 Dec 2019 22:33:26 -0500 Subject: [PATCH] CI: stop releasing archives, just release binaries --- .travis.yml | 2 +- appveyor.yml | 2 +- ci/before_deploy.ps1 | 6 ++---- ci/before_deploy.sh | 22 +++------------------- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09a71ef..50d47da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,7 +111,7 @@ deploy: api_key: secure: $GITHUB_OAUTH file_glob: true - file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* + file: $CRATE_NAME-$TRAVIS_TAG-$TARGET* on: # TODO Here you can pick which targets will generate binary releases # In this example, there are some targets that are tested using the stable diff --git a/appveyor.yml b/appveyor.yml index c77daaa..ed229f9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -64,7 +64,7 @@ before_deploy: - ps: ci\before_deploy.ps1 deploy: - artifact: /.*\.zip/ + artifact: /wireguard-proxy-.*\.exe/ # TODO update `auth_token.secure` # - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new # - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt diff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1 index cb397a2..ca80bb2 100644 --- a/ci/before_deploy.ps1 +++ b/ci/before_deploy.ps1 @@ -8,12 +8,10 @@ Set-Location $ENV:Temp New-Item -Type Directory -Name $STAGE Set-Location $STAGE -$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip" +$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).exe" # TODO Update this to package the right artifacts -Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\wireguard-proxy.exe" '.\' - -7z a "$ZIP" * +Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\wireguard-proxy.exe" "$ZIP" Push-AppveyorArtifact "$ZIP" diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 197c160..e4ab345 100644 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -3,17 +3,7 @@ set -ex main() { - local src=$(pwd) \ - stage= - - case $TRAVIS_OS_NAME in - linux) - stage=$(mktemp -d) - ;; - osx) - stage=$(mktemp -d -t tmp) - ;; - esac + local src=$(pwd) test -f Cargo.lock || cargo generate-lockfile @@ -24,19 +14,13 @@ main() { case $TARGET in x86_64-pc-windows-gnu) strip target/$TARGET/release/wireguard-proxy.exe || echo 'strip failed, ignoring...' - cp target/$TARGET/release/wireguard-proxy.exe $stage/ + cp target/$TARGET/release/wireguard-proxy.exe $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.exe ;; *) strip target/$TARGET/release/wireguard-proxy || echo 'strip failed, ignoring...' - cp target/$TARGET/release/wireguard-proxy $stage/ + cp target/$TARGET/release/wireguard-proxy $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET ;; esac - - cd $stage - tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz * - cd $src - - rm -rf $stage } main