From 5f7e171643c266a7ff0f3df8ff026151e5c37426 Mon Sep 17 00:00:00 2001 From: Lenar Sharipov Date: Wed, 8 Apr 2026 14:03:41 +0200 Subject: [PATCH 1/3] [DBA-302] add release make targets and document in README Add Makefile targets: release, minor-release, major-release, dev-release. Add a Releasing section to README describing usage. Co-Authored-By: Claude Opus 4.6 (1M context) --- Makefile | 27 ++++++++++++++++++++++++++- README.md | 16 ++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95ee7378..0c73305a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,8 @@ +LATEST_STABLE := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1) +CURRENT_MAJOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f1) +CURRENT_MINOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f2) +CURRENT_BUILD := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f3) + setup: @echo "Checking prerequisites..." @python3 --version @@ -35,4 +40,24 @@ lint-skills: uv run python scripts/validate_agent_guidance.py smoke-skills: - scripts/smoke-test-skills.sh \ No newline at end of file + scripts/smoke-test-skills.sh + +release: + @if [ -z "$(VERSION)" ]; then \ + echo "Usage: make release VERSION=0.3.0"; \ + exit 1; \ + fi + @echo "Creating release v$(VERSION)..." + git tag -a "v$(VERSION)" -m "v$(VERSION)" + git push origin "v$(VERSION)" + @echo "Tag v$(VERSION) pushed. CI will publish to PyPI." + +minor-release: VERSION = $(CURRENT_MAJOR).$(CURRENT_MINOR).$(shell echo $$(($(CURRENT_BUILD) + 1))) +minor-release: release + +major-release: VERSION = $(CURRENT_MAJOR).$(shell echo $$(($(CURRENT_MINOR) + 1))).0 +major-release: release + +dev-release: + gh workflow run publish-dev.yml + @echo "Dev release workflow triggered." \ No newline at end of file diff --git a/README.md b/README.md index b610cd86..2359cb0d 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,22 @@ pip install databao For more details about commands, supported data sources, and configuration options, visit the [docs](https://docs.databao.app). +## Releasing + +```bash +# Tag and push a specific version (CI publishes to PyPI) +make release VERSION=0.3.0 + +# Bump the patch version automatically (e.g. 0.3.0 -> 0.3.1) +make minor-release + +# Bump the minor version automatically (e.g. 0.3.1 -> 0.4.0) +make major-release + +# Trigger a dev release via GitHub Actions +make dev-release +``` + ## Contributing We love contributions! Here’s how you can help: From a86e554c74477c0092b33248c8c43d24c899ad9c Mon Sep 17 00:00:00 2001 From: Lenar Sharipov Date: Wed, 8 Apr 2026 14:11:39 +0200 Subject: [PATCH 2/3] [DBA-302] fix SemVer target naming and handle missing tags - Default LATEST_STABLE to v0.0.0 when no tags exist - Rename targets to match SemVer: patch-release, minor-release, major-release - Add major-release target (bumps major component) - Update README to reflect corrected target names Co-Authored-By: Claude Opus 4.6 (1M context) --- Makefile | 9 ++++++--- README.md | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0c73305a..2d7f6b10 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -LATEST_STABLE := $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1) +LATEST_STABLE := $(shell tag="$$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)"; if [ -n "$$tag" ]; then echo "$$tag"; else echo "v0.0.0"; fi) CURRENT_MAJOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f1) CURRENT_MINOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f2) CURRENT_BUILD := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f3) @@ -52,10 +52,13 @@ release: git push origin "v$(VERSION)" @echo "Tag v$(VERSION) pushed. CI will publish to PyPI." -minor-release: VERSION = $(CURRENT_MAJOR).$(CURRENT_MINOR).$(shell echo $$(($(CURRENT_BUILD) + 1))) +patch-release: VERSION = $(CURRENT_MAJOR).$(CURRENT_MINOR).$(shell echo $$(($(CURRENT_BUILD) + 1))) +patch-release: release + +minor-release: VERSION = $(CURRENT_MAJOR).$(shell echo $$(($(CURRENT_MINOR) + 1))).0 minor-release: release -major-release: VERSION = $(CURRENT_MAJOR).$(shell echo $$(($(CURRENT_MINOR) + 1))).0 +major-release: VERSION = $(shell echo $$(($(CURRENT_MAJOR) + 1))).0.0 major-release: release dev-release: diff --git a/README.md b/README.md index 2359cb0d..5ec88ee2 100644 --- a/README.md +++ b/README.md @@ -95,9 +95,12 @@ visit the [docs](https://docs.databao.app). make release VERSION=0.3.0 # Bump the patch version automatically (e.g. 0.3.0 -> 0.3.1) -make minor-release +make patch-release # Bump the minor version automatically (e.g. 0.3.1 -> 0.4.0) +make minor-release + +# Bump the major version automatically (e.g. 0.4.0 -> 1.0.0) make major-release # Trigger a dev release via GitHub Actions From f0a93024667338f7d95e5af9e41e6ba00112a0c2 Mon Sep 17 00:00:00 2001 From: Lenar Sharipov Date: Wed, 8 Apr 2026 14:23:15 +0200 Subject: [PATCH 3/3] Simplify LATEST_STABLE initialization with `$(or)` function --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2d7f6b10..29206b44 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -LATEST_STABLE := $(shell tag="$$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)"; if [ -n "$$tag" ]; then echo "$$tag"; else echo "v0.0.0"; fi) +LATEST_STABLE := $(or $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1),v0.0.0) CURRENT_MAJOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f1) CURRENT_MINOR := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f2) CURRENT_BUILD := $(shell echo $(LATEST_STABLE) | sed 's/^v//' | cut -d. -f3)