ac1a5d85f6
Builds the AlmaLinux 9 node rootfs tarball bootapi's image-based provisioning (liveimg) unpacks, and on a v* tag publishes almalinux9-node-<ver>.tar.zst to the artifactapi rootfs-images repo. Moved out of bootapi-templates (which stays templates-only) per review on bootapi-templates#3. - packages.txt (bake list) + scripts/build-rootfs.sh (dnf --installroot -> tar.zst). - .woodpecker: pre-commit + shellcheck (PR); build+upload on v* tag. - Makefile (build/lint/patch|minor|major). Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
.PHONY: build lint clean patch minor major
|
|
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev")
|
|
|
|
# Build the rootfs tarball locally (needs dnf + tar + zstd; run as root).
|
|
build:
|
|
./scripts/build-rootfs.sh $(VERSION)
|
|
|
|
lint:
|
|
shellcheck scripts/*.sh
|
|
|
|
clean:
|
|
rm -rf rootfs/ dist/
|
|
|
|
# --- version bump: tag + push triggers the release pipeline (build + upload) ---
|
|
_LATEST := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)
|
|
_BASE := $(if $(_LATEST),$(_LATEST),v0.0.0)
|
|
_MAJ := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f1)
|
|
_MIN := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f2)
|
|
_PAT := $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3)
|
|
|
|
patch:
|
|
@NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
minor:
|
|
@NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|
|
|
|
major:
|
|
@NEW=v$(shell expr $(_MAJ) + 1).0.0; \
|
|
git tag $$NEW && echo "Tagged $$NEW" && git push origin $$NEW
|