build: add make convenience wrapper for guix scripts
Some checks failed
ci/gh-actions/build / build-ubuntu-without-scanner (push) Has been cancelled
ci/gh-actions/guix / cache-sources (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / arm-linux-gnueabihf (push) Has been cancelled
ci/gh-actions/guix / arm64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / riscv64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.no-tor-bundle (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu.pack (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32.installer (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32 (push) Has been cancelled
ci/gh-actions/guix / bundle-logs (push) Has been cancelled
ci/gh-actions/guix / codesigning (map[target:x86_64-w64-mingw32.installer]) (push) Has been cancelled
ci/gh-actions/guix / codesigning (map[target:x86_64-w64-mingw32]) (push) Has been cancelled

This commit is contained in:
tobtoht 2024-11-04 18:19:56 +01:00
parent d877523cce
commit 725ad63210
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
4 changed files with 93 additions and 9 deletions

19
Makefile Normal file
View file

@ -0,0 +1,19 @@
build:
@./contrib/guix/guix-build
codesign:
@./contrib/guix/guix-codesign
attest:
@./contrib/guix/guix-attest
verify:
@./contrib/guix/guix-attest
clean:
@./contrib/guix/guix-clean
DEFAULT_GOAL := default
default: build
.PHONY: default build attest verify clean

View file

@ -66,9 +66,50 @@ Example w/o signing, just creating SHA256SUMS:
EOF
}
if [ -z "$GUIX_SIGS_REPO" ] || [ -z "$SIGNER" ]; then
cmd_usage
exit 1
if [ -z "${GUIX_SIGS_REPO}" ]; then
echo "[HINT] Fork and clone the feather-sigs repo, if you haven't already:"
echo "https://github.com/feather-wallet/feather-sigs"
echo ""
printf "Enter path to 'feather-sigs' repo: "
read -r repo
if [ ! -d "${repo}" ]; then
echo "ERR: directory does not exist"
exit 1
fi
export GUIX_SIGS_REPO="$repo"
wizard=1
fi
if [ -z "${SIGNER}" ]; then
printf "Enter your GitHub username: "
read -r signer
if [ -z "$signer" ]; then
echo "ERR: signer name can't be empty"
exit 1
fi
echo ""
echo "[HINT] To find your GPG fingerprint use:"
echo "gpg --list-secret-keys --keyid-format=long"
echo "It should look like: E87BD921CDD885C9D78A38C5E45B10DD027D2472"
echo ""
printf "Enter fingerprint of your GPG key: "
read -r fingerprint
export SIGNER="${fingerprint}=${signer}"
wizard=1
fi
if [ -n "$wizard" ]; then
echo ""
echo "Next time, invoke this command as:"
echo "env GUIX_SIGS_REPO=${GUIX_SIGS_REPO} SIGNER=${SIGNER} make attest"
echo ""
fi
################

View file

@ -35,8 +35,22 @@ EOF
}
if [ -z "$GUIX_SIGS_REPO" ]; then
cmd_usage
exit 1
echo "[HINT] Fork and clone the feather-sigs repo:"
echo "https://github.com/feather-wallet/feather-sigs"
echo ""
printf "Enter path to 'feather-sigs' repo: "
read -r GUIX_SIGS_REPO
if [ ! -d "${GUIX_SIGS_REPO}" ]; then
echo "Directory does not exist"
exit 1
fi
echo ""
echo "Next time, invoke this command as:"
echo "env GUIX_SIGS_REPO=${GUIX_SIGS_REPO} make codesign"
echo ""
fi
################
@ -73,7 +87,7 @@ fi
if ! git -C "$GUIX_SIGS_REPO" diff-index --quiet HEAD -- && [ -z "$FORCE_DIRTY_WORKTREE" ]; then
cat << EOF
ERR: The DETACHED CODESIGNATURE git worktree is dirty, which may lead to broken builds.
ERR: The FEATHER SIGS git worktree is dirty, which may lead to broken builds.
Aborting...

View file

@ -37,9 +37,19 @@ Example overriding signer's manifest to use as base
EOF
}
if [ -z "$GUIX_SIGS_REPO" ]; then
cmd_usage
exit 1
if [ -z "${GUIX_SIGS_REPO}" ]; then
printf "Enter path to 'feather-sigs' repo: "
read -r GUIX_SIGS_REPO
if [ ! -d "${GUIX_SIGS_REPO}" ]; then
echo "Directory does not exist"
exit 1
fi
echo ""
echo "Next time, invoke this command as:"
echo "env GUIX_SIGS_REPO=${GUIX_SIGS_REPO} make verify"
echo ""
fi
################