1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 21:32:13 +03:00

maybe teach appveyor how to deploy windows builds

This commit is contained in:
Wez Furlong 2019-03-24 13:55:08 -07:00
parent 5bb88fa066
commit f7c3743247
2 changed files with 33 additions and 7 deletions

View File

@ -12,5 +12,17 @@ test_script:
- git submodule update --init
- cargo build --release
- cargo test --release --all
- bash ci/deploy.sh
artifacts:
- path: target/release/wezterm.exe
- path: 'WezTerm*.zip'
deploy:
release: $(APPVEYOR_REPO_TAG_NAME)
provider: GitHub
auth_token:
secure: MEa32ld6Qe1Lswvc0iE6+q6bKAkOXDa+5PukIFWXekh8uwYNhf0k0kpK8QbSgZk6
artifact: WezTerm*.zip
draft: false
prerelease: false
on:
branch: master
APPVEYOR_REPO_TAG: true

View File

@ -1,20 +1,34 @@
#!/bin/bash
set -x
TRAVIS_TAG=${TRAVIS_TAG:-$(git describe --tags)}
TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
if [[ "$TRAVIS" != "" ]] ; then
DEPLOY_ENV_TYPE="travis"
TAG_NAME=$TRAVIS_TAG
elif [[ "$APPVEYOR" != "" ]] ; then
DEPLOY_ENV_TYPE="appveyor"
TAG_NAME=$APPVEYOR_REPO_TAG_NAME
else
DEPLOY_ENV_TYPE="adhoc"
fi
bash -x ./install.sh
TAG_NAME=${TAG_NAME:-$(git describe --tags)}
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
HERE=$(pwd)
case $OSTYPE in
darwin*)
(cd $HOME/Applications && zip -r $HERE/WezTerm-macOS-$TRAVIS_TAG.zip WezTerm.app)
zipdir=WezTerm-macos-$DEPLOY_ENV_TYPE-$TAG_NAME
rm -rf $zipdir $zipdir.zip
mkdir $zipdir
cp -r assets/macos/WezTerm.app $zipdir/
cp target/release/wezterm $zipdir/WezTerm.app
zip -r $zipdir.zip $zipdir
;;
msys)
zipdir=WezTerm-windows-$TRAVIS_TAG
mkdir zipdir
zipdir=WezTerm-windows-$DEPLOY_ENV_TYPE-$TAG_NAME
rm -rf $zipdir $zipdir.zip
mkdir $zipdir
cp target/release/wezterm.exe target/release/wezterm.pdb $zipdir
7z a -tzip $zipdir.zip $zipdir
;;