Files
draft/Makefile
T
FernandoJVideiraandClaude Fable 5.1 2f1ad93a74 Ship the client Dockerfile with generated Nuxt apps; bump to v0.2.0
A generated monorepo's docker-compose.yml already built apps/client from
apps/client/Dockerfile, but the client overlay only embedded app/ and
public/, so the file never existed and `docker compose build client`
failed on every fresh project. The client-nuxt sync job now embeds the
template's Dockerfile too, and the Nuxt scaffold rewrites its pnpm pin to
the locally detected version - the one that produces the generated
project's lockfile - the same way it already stamps packageManager.

Bumps the submodule to the template commit that mounts ~/.npmrc as a
build secret for the registry token, and the Makefile VERSION to v0.2.0
for the release.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-16 13:08:18 +01:00

31 lines
1.1 KiB
Makefile

PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft
VERSION := v0.2.0
GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*')
.PHONY: version build windows win-arm linux mac prepare-embed clean
version:
@go run -ldflags "-X ${PKG_NAME}/cmd.version=${VERSION}" ./main.go version
windows: ; @$(MAKE) build GOOS=windows GOARCH=amd64 OUTPUT=draft_windows_amd64.exe
win-arm: ; @$(MAKE) build GOOS=windows GOARCH=arm64 OUTPUT=draft_windows_arm64.exe
linux: ; @$(MAKE) build GOOS=linux GOARCH=amd64 OUTPUT=draft_linux_amd64
mac: ; @$(MAKE) build GOOS=darwin GOARCH=arm64 OUTPUT=draft_darwin_arm64
build: $(OUTPUT)
$(OUTPUT): prepare-embed-stamp $(GO_SOURCES)
@echo "Building for $(GOOS)/$(GOARCH)..."
@GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "-X ${PKG_NAME}/cmd.version=${VERSION}" -o $(OUTPUT) ./main.go
prepare-embed-stamp:
@git submodule update --init --recursive
@mkdir -p assets/embedded
@GOOS="" GOARCH="" go run tools/sync_templates.go
@touch $@
prepare-embed: prepare-embed-stamp
clean:
@rm -f draft_windows_amd64.exe draft_windows_arm64.exe draft_linux_amd64 draft_darwin_arm64 prepare-embed-stamp