mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-11 10:46:43 +03:00
43 lines
531 B
Bash
Executable File
43 lines
531 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
usage() {
|
|
local error="$1"
|
|
|
|
cat >&2 <<EOF
|
|
Usage:
|
|
$0 PROJECT REV
|
|
|
|
Synopsis:
|
|
Call git-archive(1) to create a release archive of the desired project at the
|
|
desired revision.
|
|
|
|
Outputs a gzipped tarball to the release/ directory.
|
|
|
|
Example:
|
|
$0 urbit v0.10.3
|
|
|
|
Error:
|
|
-> $error
|
|
EOF
|
|
|
|
exit 1
|
|
}
|
|
|
|
args="$@"
|
|
|
|
if [[ -z "$args" ]]; then
|
|
usage "No arguments specified."
|
|
fi
|
|
|
|
PROJECT=$1
|
|
REV=$2
|
|
|
|
mkdir -p release
|
|
|
|
git archive --prefix="$REV/" \
|
|
-o release/$REV.tar.gz \
|
|
$REV:pkg/$PROJECT
|
|
|