build: Small changes to build script

This commit is contained in:
cloudhead 2024-05-01 16:09:23 +02:00
parent abf89438ea
commit 1708ddf777
No known key found for this signature in database
1 changed files with 7 additions and 5 deletions

View File

@ -10,15 +10,15 @@ main() {
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
if ! command -v rad > /dev/null; then if ! command -v rad > /dev/null; then
echo "fatal: rad is not installed" ; exit 1 echo "fatal: rad is not installed" >&2 ; exit 1
fi fi
if ! command -v podman > /dev/null; then if ! command -v podman > /dev/null; then
echo "fatal: podman is not installed" ; exit 1 echo "fatal: podman is not installed" >&2 ; exit 1
fi fi
if ! command -v sha256sum > /dev/null; then if ! command -v sha256sum > /dev/null; then
echo "fatal: sha256sum is not installed" ; exit 1 echo "fatal: sha256sum is not installed" >&2 ; exit 1
fi fi
rev="$(git rev-parse --short HEAD)" rev="$(git rev-parse --short HEAD)"
@ -29,7 +29,7 @@ main() {
image=radicle-build-$version image=radicle-build-$version
if [ ! -f "$keypath" ]; then if [ ! -f "$keypath" ]; then
echo "fatal: no key found at $keypath" ; exit 1 echo "fatal: no key found at $keypath" >&2 ; exit 1
fi fi
# Authenticate user for signing # Authenticate user for signing
rad auth rad auth
@ -41,6 +41,8 @@ main() {
echo "Building image ($image).." echo "Building image ($image).."
podman --cgroup-manager=cgroupfs build \ podman --cgroup-manager=cgroupfs build \
--env SOURCE_DATE_EPOCH \ --env SOURCE_DATE_EPOCH \
--env TZ \
--env LC_ALL \
--env GIT_COMMIT_TIME=$SOURCE_DATE_EPOCH \ --env GIT_COMMIT_TIME=$SOURCE_DATE_EPOCH \
--env GIT_HEAD=$rev \ --env GIT_HEAD=$rev \
--env RADICLE_VERSION=$version \ --env RADICLE_VERSION=$version \
@ -86,4 +88,4 @@ echo
build/checksums build/checksums
echo echo
echo "Build ran successfully." echo "Build successful."