mirror of
https://github.com/openoms/joininbox.git
synced 2026-08-13 12:33:14 +02:00
46 lines
1.5 KiB
Makefile
46 lines
1.5 KiB
Makefile
SHELL = /bin/bash
|
|
GITHUB_USER = $(shell git remote -v | grep origin | head -1 | cut -d/ -f4)
|
|
CURRENT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
amd64-image:
|
|
# build image
|
|
cd ci/amd64 && \
|
|
bash packer.build.amd64-debian.sh $(GITHUB_USER) $(CURRENT_BRANCH)
|
|
|
|
# Compute checksum of the raw image
|
|
cd ci/amd64/builds/joininbox-amd64-debian-qemu && \
|
|
sha256sum joininbox-amd64-debian-11.5.qcow2 > joininbox-amd64-debian-11.5.qcow2.sha256
|
|
|
|
# Compress image
|
|
cd ci/amd64/builds/joininbox-amd64-debian-qemu && \
|
|
gzip -v9 joininbox-amd64-debian-11.5.qcow2
|
|
|
|
# Compute checksum of the compressed image
|
|
cd ci/amd64/builds/joininbox-amd64-debian-qemu && \
|
|
sha256sum joininbox-amd64-debian-11.5.qcow2.gz > joininbox-amd64-debian-11.5.qcow2.gz.sha256
|
|
|
|
arm64-rpi-image:
|
|
# build image
|
|
cd ci/arm64-rpi && \
|
|
bash arm64-rpi.sh $(GITHUB_USER) $(CURRENT_BRANCH)
|
|
|
|
# Compute checksum of the raw image
|
|
cd ci/arm64-rpi && \
|
|
sha256sum joininbox-arm64-rpi.img > joininbox-arm64-rpi.img.sha256
|
|
|
|
# Compress image
|
|
cd ci/arm64-rpi && \
|
|
gzip -v9 joininbox-arm64-rpi.img
|
|
|
|
# Compute checksum of the compressed image
|
|
cd ci/arm64-rpi && \
|
|
sha256sum joininbox-arm64-rpi.img.gz > joininbox-arm64-rpi.img.gz.sha256
|
|
|
|
release-tag:
|
|
@if [ -z "$(TAG)" ]; then \
|
|
echo "Error: TAG parameter is required. Usage: make release-tag TAG=v0.7.4"; \
|
|
exit 1; \
|
|
fi
|
|
@echo "Creating signed tag $(TAG) and pushing to origin..."
|
|
git tag -s $(TAG) -m "$(TAG)" && git push origin $(TAG)
|
|
@echo "Successfully created and pushed signed tag $(TAG)"
|