Browse Source

CI: stop releasing archives, just release binaries

master
Travis Burtrum 2 years ago
parent
commit
9d37f3d929
  1. 2
      .travis.yml
  2. 2
      appveyor.yml
  3. 6
      ci/before_deploy.ps1
  4. 22
      ci/before_deploy.sh

2
.travis.yml

@ -111,7 +111,7 @@ deploy: @@ -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

2
appveyor.yml

@ -64,7 +64,7 @@ before_deploy: @@ -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

6
ci/before_deploy.ps1

@ -8,12 +8,10 @@ Set-Location $ENV:Temp @@ -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"

22
ci/before_deploy.sh

@ -3,17 +3,7 @@ @@ -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() { @@ -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

Loading…
Cancel
Save