Skip to content

Commit ea68b91

Browse files
committed
feat(pulumi): add 'make release-snapshot' for local goreleaser dry-run
Validates the exact CI goreleaser config (v2.15.4 image) locally before pushing a tag. Skips publish + sign — catches template errors, YAML quirks, hook failures, and build failures without a GitHub round-trip. Usage: cd pulumi && make release-snapshot # ~2-9min depending on Go module cache cd pulumi && make release-snapshot-clean # remove root-owned dist/ Prior to this target we iterated through ~4 failed CI runs fixing issues (tag_prefix, .Env.VERSION residue, cmd:/dir: map form) that would have been caught in a single local run.
1 parent 4039c66 commit ea68b91

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

pulumi/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,24 @@ clean:
120120
rm -f $(TFGEN_BIN) $(RUNTIME_BIN)
121121
rm -f $(SCHEMA_DIR)/schema.json $(SCHEMA_DIR)/bridge-metadata.json $(SCHEMA_DIR)/schema-embed.json
122122

123+
# Dry-run the goreleaser release locally in the exact CI container image.
124+
# Skips publish/sign — just validates config, hooks, build, archive, checksum.
125+
# Catches template errors, YAML quirks, and build failures before pushing a tag.
126+
# Clean up dist/ afterwards with: make release-snapshot-clean
127+
GORELEASER_IMAGE := goreleaser/goreleaser:v2.15.4
128+
.PHONY: release-snapshot release-snapshot-clean
129+
release-snapshot:
130+
docker run --rm \
131+
-v "$(CURDIR)/..:/work" \
132+
-w /work/pulumi \
133+
-e GOFLAGS=-buildvcs=false \
134+
$(GORELEASER_IMAGE) \
135+
release --snapshot --skip=publish --skip=sign --clean \
136+
--config .goreleaser.pulumi.yml
137+
138+
release-snapshot-clean:
139+
docker run --rm -v "$(CURDIR):/work" -w /work alpine rm -rf dist
140+
123141
# DOCS-01: PULUMI_CONVERT translation report.
124142
# Running tfgen with PULUMI_CONVERT=1 causes the bridge to attempt converting
125143
# TF HCL examples to Pulumi Python + Go. Failures are captured but non-blocking.

0 commit comments

Comments
 (0)