From 6ed25f26baf57115f8907966b0e170cef55f2a81 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 27 Oct 2024 14:10:34 -0400 Subject: Add initial setup --- bin/build | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 bin/build (limited to 'bin/build') 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 "} + +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 -- cgit v1.2.3