Add StartOS 0.4.0 packaging
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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
|
||||
Reference in New Issue
Block a user