shrub/sh/release

22 lines
400 B
Plaintext
Raw Normal View History

2019-03-05 03:43:53 +03:00
#!/usr/bin/env bash
# Usage: release
# Create a static tarball under ./release named with the current git revision.
set -xeuo pipefail
cd "${0%/*}/.."
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
cp -f "$out" "$tgz"
chmod 0644 "$tgz"