From e6d7ed5904db935e756287d52f5da5bd01b43b7e Mon Sep 17 00:00:00 2001 From: William Petit Date: Mon, 1 Aug 2022 10:36:00 +0200 Subject: [PATCH] chore: add release preparation tasks with changelog generation --- .chglog/config.yml | 22 +++++++++++----------- .gitignore | 1 - Makefile | 26 +++++++++++++++++++++++++- README.md | 6 ++++++ 4 files changed, 42 insertions(+), 13 deletions(-) diff --git a/.chglog/config.yml b/.chglog/config.yml index 53f57de..89c7a0a 100644 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -5,18 +5,18 @@ info: repository_url: https://github.com/Bornholm/formidable options: commits: - # filters: - # Type: - # - feat - # - fix - # - perf - # - refactor + filters: + Type: + - feat + - fix + - perf + - refactor commit_groups: - # title_maps: - # feat: Features - # fix: Bug Fixes - # perf: Performance Improvements - # refactor: Code Refactoring + title_maps: + feat: Features + fix: Bug Fixes + perf: Performance Improvements + refactor: Code Refactoring header: pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" pattern_maps: diff --git a/.gitignore b/.gitignore index 0b7bb2d..9fc781b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ /node_modules /internal/server/assets/dist/* dist/ -/CHANGELOG.md /tools diff --git a/Makefile b/Makefile index 10ad314..b6c10b8 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,8 @@ GITCHLOG_ARGS ?= SHELL := /bin/bash RUN_INSTALL_TESTS ?= yes +FORMIDABLE_VERSION := 0.0.5 + .PHONY: help help: ## Display this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @@ -60,9 +62,31 @@ node_modules: release: deps ( set -o allexport && source .env && set +o allexport && VERSION=$(GORELEASER_VERSION) curl -sfL https://goreleaser.com/static/run | bash /dev/stdin $(GORELEASER_ARGS) ) +.PHONY: start-release +start-release: + #git flow release start $(FORMIDABLE_VERSION) + + # Update package.json version + jq '.version = "$(FORMIDABLE_VERSION)"' package.json | sponge package.json + git add package.json + git commit -m "chore: bump to version $(FORMIDABLE_VERSION)" + + # Generate updated changelog + $(MAKE) GITCHLOG_ARGS='--next-tag $(FORMIDABLE_VERSION)' changelog + git add CHANGELOG.md + git commit -m "chore: update changelog for version $(FORMIDABLE_VERSION)" + + echo "Commit you additional modifications then execute 'make finish-release'" + +.PHONY: finish-release +finish-release: + git flow release finish -m "v$(FORMIDABLE_VERSION)" + git push --all + git push --tags + .PHONY: changelog changelog: - go run -mod=readonly github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1 $(GITCHLOG_ARGS) + go run -mod=readonly github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.1 $(GITCHLOG_ARGS) > CHANGELOG.md install-git-hooks: git config core.hooksPath .githooks \ No newline at end of file diff --git a/README.md b/README.md index ce80b06..e0a6cdf 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Web-based - but terminal compatible ! - little form editor using [JSONSchema](ht The generated web UI does not use Javascript and can be used with terminal browsers like [w3m](https://en.wikipedia.org/wiki/W3m) or [lynx](https://en.wikipedia.org/wiki/Lynx_(web_browser)). +> ⚠ Formidable is currently in a very alpha stage ! Expect breaking changes... + ## Install ### Manually @@ -93,6 +95,10 @@ echo '{}' | FORMIDABLE_BROWSER="firefox" frmd \ > TODO: Write doc + example +## Changelog + +[See `CHANGELOG.md`](./CHANGELOG.md) + ## Licence AGPL-3.0