VERSION := $(shell cat VERSION)
REVISION := $(shell git rev-parse HEAD 2>/dev/null || printf local)
IMAGE ?= orbitmail:$(VERSION)

.PHONY: help build verify source
help:
	@printf '%s\n' 'make build: compile the independent release image' 'make source: create the source offer in dist/' 'make verify: run the disposable container smoke'

build:
	bash scripts/build-release.sh --image "$(IMAGE)"

source:
	node scripts/build-source.mjs --root . --output dist/orbitmail-source.tar.gz --version "$(VERSION)" --revision "$(REVISION)"

verify:
	bash scripts/verify-smoke.sh "$(IMAGE)"
