Skip to content

Commit b83b05d

Browse files
committed
Add make release target for streamlined releases
1 parent c35bf14 commit b83b05d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ build-docker:
2323
publish-docker: build-docker
2424
docker tag dbmigrate:latest choonkeat/dbmigrate
2525
docker push choonkeat/dbmigrate
26+
27+
release:
28+
ifndef RELEASE_VERSION
29+
$(error RELEASE_VERSION is required. Usage: make release RELEASE_VERSION=3.0.1)
30+
endif
31+
git diff --quiet || (echo "Error: uncommitted changes. Commit or stash first." && exit 1)
32+
git push origin master
33+
git tag v$(RELEASE_VERSION)
34+
git push origin v$(RELEASE_VERSION)
35+
@echo ""
36+
@echo "Released v$(RELEASE_VERSION)"
37+
@echo "Docker image will be built by GitHub Actions: choonkeat/dbmigrate:$(RELEASE_VERSION)"

0 commit comments

Comments
 (0)