urbit/sh/release

22 lines
400 B
Bash
Executable File

#!/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"