diff options
author | Kyle Meyer <kyle@kyleam.com> | 2024-10-27 14:10:34 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2024-10-27 14:13:09 -0400 |
commit | 6ed25f26baf57115f8907966b0e170cef55f2a81 (patch) | |
tree | 83543667117851faddae91aaaea7e39c139f1479 /bin/build | |
download | static-annex-6ed25f26baf57115f8907966b0e170cef55f2a81.tar.gz |
Add initial setup
Diffstat (limited to 'bin/build')
-rwxr-xr-x | bin/build | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/build b/bin/build new file mode 100755 index 0000000..63cfe97 --- /dev/null +++ b/bin/build @@ -0,0 +1,27 @@ +#!/bin/sh +# SPDX-License-Identifier: 0BSD + +set -eu + +img=${1?"usage: $0 <image>"} + +test -f git-annex/git-annex.cabal || { + printf >&2 'initialize git-annex submodule first\n' + exit 1 +} +test -z "$(git -C git-annex status --porcelain -unormal)" || { + printf >&2 'git-annex repository is dirty\n' + exit 1 +} +test -n "$(git -C git-annex for-each-ref --points-at=HEAD refs/tags)" || { + printf >&2 'git-annex repository must be on a tagged commit\n' + exit 1 +} + +git -C git-annex clean -xfd +podman run \ + -v ./git-annex:/git-annex \ + -v ./img-scripts:/mnt \ + -w /git-annex \ + --env RELEASE_BUILD=1 --rm \ + "$img" /mnt/build |