Files
recap/start9/0.4/Makefile
T
2026-04-09 15:03:31 -05:00

27 lines
692 B
Makefile

PKG_ID := $(shell awk '/^id:/{print $$2; exit}' manifest.yaml)
PKG_VERSION := $(shell awk '/^version:/{print $$2; exit}' manifest.yaml)
REPO_ROOT := $(abspath ../..)
WRAPPER_DIR := $(CURDIR)
IMAGE_NAME := start9/$(PKG_ID)/main:$(PKG_VERSION)
# Default to x86_64; override with: make PLATFORM=linux/arm64 image
PLATFORM ?= linux/amd64
.PHONY: image package verify clean
image:
docker buildx build --platform=$(PLATFORM) \
-f $(WRAPPER_DIR)/Dockerfile \
-t $(IMAGE_NAME) \
-o type=docker,dest=$(WRAPPER_DIR)/image.tar \
$(REPO_ROOT)
package: image
start-sdk pack
verify:
start-sdk verify s9pk $(PKG_ID).s9pk
clean:
rm -f $(WRAPPER_DIR)/image.tar $(WRAPPER_DIR)/$(PKG_ID).s9pk