2019-03-05 03:43:53 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-12-19 19:11:59 +03:00
|
|
|
set -ex
|
2019-03-05 03:43:53 +03:00
|
|
|
|
2019-05-02 23:13:48 +03:00
|
|
|
if [ -n "${TRAVIS_TAG-}" ]
|
|
|
|
then
|
|
|
|
ver="$TRAVIS_TAG"
|
|
|
|
elif [ -n "${TRAVIS_COMMIT-}" ]
|
|
|
|
then
|
|
|
|
ver="$TRAVIS_COMMIT"
|
|
|
|
else
|
|
|
|
ver="$(git rev-parse HEAD)"
|
|
|
|
fi
|
|
|
|
|
2020-01-31 07:59:57 +03:00
|
|
|
traced () {
|
|
|
|
echo '$' "$@" >&2; "$@"
|
|
|
|
}
|
|
|
|
|
2019-05-02 23:13:48 +03:00
|
|
|
mkdir -p release
|
|
|
|
|
|
|
|
for plat in linux64 darwin
|
|
|
|
do
|
|
|
|
sh/cross urbit "$plat"
|
|
|
|
|
2020-01-31 07:59:57 +03:00
|
|
|
tmp=$(mktemp -d)
|
|
|
|
mkdir -p $tmp/urbit-$plat-$ver
|
|
|
|
traced cp -r cross/$plat/* $tmp/urbit-$plat-$ver
|
|
|
|
|
2019-05-02 23:13:48 +03:00
|
|
|
echo "packaging release/urbit-$plat-$ver.tgz"
|
2020-01-31 07:59:57 +03:00
|
|
|
(cd $tmp; tar cz urbit-$plat-$ver) > release/urbit-$plat-$ver.tgz
|
|
|
|
|
|
|
|
rm -rf $tmp
|
2019-05-02 23:13:48 +03:00
|
|
|
done
|