urbit/sh/release-king-darwin-dynamic
2020-01-23 21:34:21 -08:00

30 lines
472 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
export STACK_YAML="`pwd`/pkg/hs/stack.yaml"
mkdir -p release
stack clean # Make sure we optimize
stack install urbit-king \
--local-bin-path "`pwd`/release" \
--test --no-run-tests
out="release/king-darwin-dynamic-$ver"
mv release/urbit-king "$out"
otool -L "$out"