diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9e2d307..87ab129 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -64,9 +64,14 @@ jobs: working-directory: pulumi-dokploy run: make provider - # schema.json and bridge-metadata.json are checked in and carry no - # version, so they only change when the mapping does. A diff here means - # someone edited resources.go without re-running `make tfgen`. + # schema.json and bridge-metadata.json are checked in, so a diff here + # means someone edited resources.go without re-running `make tfgen`. + # + # schema.json *does* carry the upstream version, in `packageDescription`, + # and this job builds at the Makefile's default VERSION. So the default + # has to be bumped in the same commit that regenerates the schema for a + # release, or this step fails on a mismatch that has nothing to do with + # the mapping. That is exactly how it failed for v0.2.0. - name: Fail if the checked-in schema is stale working-directory: pulumi-dokploy run: git diff --exit-code -- provider/cmd/pulumi-resource-dokploy/schema.json diff --git a/Makefile b/Makefile index af7af71..acf4a45 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,12 @@ PROVIDER := pulumi-resource-$(PACK) WORKING_DIR := $(shell pwd) SCHEMA_DIR := $(WORKING_DIR)/provider/cmd/$(PROVIDER) -# Override on the command line for a release build, e.g. `make build VERSION=0.2.0`. -VERSION ?= 0.1.0 +# The checked-in schema.json embeds this version in `packageDescription`, and +# CI diffs the regenerated schema against it on every push to main. So this +# default is not cosmetic: it has to match the version the committed schema was +# generated at, which means bumping it in the same commit as a release. +# Release builds override it from the tag. +VERSION ?= 0.2.0 LDFLAGS := -X $(PROJECT)/$(VERSION_PATH)=$(VERSION) JAVASCRIPT_PKG := @$(ORG)/pulumi-$(PACK)