urbit/sh/release

34 lines
506 B
Plaintext
Raw Normal View History

2019-03-05 03:43:53 +03:00
#!/usr/bin/env bash
set -ex
2019-03-05 03:43:53 +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
traced () {
echo '$' "$@" >&2; "$@"
}
mkdir -p release
for plat in linux64 darwin
do
sh/cross urbit "$plat"
tmp=$(mktemp -d)
mkdir -p $tmp/$ver-$plat
traced cp -r cross/$plat/* $tmp/$ver-$plat
echo "packaging release/$ver-$plat.tgz"
(cd $tmp; tar cz $ver-$plat) > release/$ver-$plat.tgz
rm -rf $tmp
done