2019-03-05 03:43:53 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
# Usage: release
|
2020-01-31 07:59:57 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
# Create a static tarball under ./release named with the current git revision.
|
|
|
|
|
|
|
|
set -xeuo pipefail
|
2019-05-02 23:13:48 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
cd "${0%/*}/.."
|
2019-05-02 23:13:48 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
rev="$(git rev-parse HEAD)"
|
|
|
|
sha="${rev:0:5}"
|
|
|
|
ver="$(cat pkg/urbit/version)"
|
|
|
|
tgz="release/urbit-v${ver}-${sha}.tar.gz"
|
|
|
|
out="$(nix-build -A tarball --arg enableStatic true --no-out-link)"
|
|
|
|
|
|
|
|
mkdir -p release
|
2020-01-31 07:59:57 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
cp -f "$out" "$tgz"
|
2020-01-31 07:59:57 +03:00
|
|
|
|
2020-10-27 13:52:04 +03:00
|
|
|
chmod 0644 "$tgz"
|