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)
|
2020-03-04 17:32:48 +03:00
|
|
|
mkdir -p $tmp/$ver-$plat
|
|
|
|
traced cp -r cross/$plat/* $tmp/$ver-$plat
|
2020-01-31 07:59:57 +03:00
|
|
|
|
2020-03-04 17:32:48 +03:00
|
|
|
echo "packaging release/$ver-$plat.tgz"
|
|
|
|
(cd $tmp; tar cz $ver-$plat) > release/$ver-$plat.tgz
|
2020-01-31 07:59:57 +03:00
|
|
|
|
|
|
|
rm -rf $tmp
|
2019-05-02 23:13:48 +03:00
|
|
|
done
|