mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 20:47:27 +03:00
5e0f185df2
This adds a new build stage called combine which takes the results of the previous compile builds and packages them up into one release tarball per platform.
34 lines
531 B
Bash
Executable File
34 lines
531 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
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/vere-$ver-$plat
|
|
traced cp -r cross/$plat/* $tmp/vere-$ver-$plat
|
|
|
|
echo "packaging release/vere-$ver-$plat.tgz"
|
|
(cd $tmp; tar cz vere-$ver-$plat) > release/vere-$ver-$plat.tgz
|
|
|
|
rm -rf $tmp
|
|
done
|