2019-03-24 05:39:25 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
|
2019-03-24 23:55:08 +03:00
|
|
|
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
|
2019-03-24 09:59:08 +03:00
|
|
|
|
2019-03-24 23:55:08 +03:00
|
|
|
TAG_NAME=${TAG_NAME:-$(git describe --tags)}
|
|
|
|
TAG_NAME=${TAG_NAME:-$(date +'%Y%m%d-%H%M%S')-$(git log --format=%h -1)}
|
2019-03-24 05:39:25 +03:00
|
|
|
|
|
|
|
HERE=$(pwd)
|
|
|
|
|
|
|
|
case $OSTYPE in
|
|
|
|
darwin*)
|
2019-03-24 23:55:08 +03:00
|
|
|
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
|
2019-03-24 05:39:25 +03:00
|
|
|
;;
|
2019-03-24 20:42:20 +03:00
|
|
|
msys)
|
2019-03-24 23:55:08 +03:00
|
|
|
zipdir=WezTerm-windows-$DEPLOY_ENV_TYPE-$TAG_NAME
|
|
|
|
rm -rf $zipdir $zipdir.zip
|
|
|
|
mkdir $zipdir
|
2019-03-24 20:42:20 +03:00
|
|
|
cp target/release/wezterm.exe target/release/wezterm.pdb $zipdir
|
|
|
|
7z a -tzip $zipdir.zip $zipdir
|
|
|
|
;;
|
2019-03-24 05:39:25 +03:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|