From a1451799aeade09f8df492604a6b95bf4ff17adf Mon Sep 17 00:00:00 2001 From: Thibault Charbonnier Date: Mon, 24 Jun 2024 18:05:04 -0700 Subject: [PATCH] chore(util) new 'changelog' script and Makefile target E.g: $ make changelog misc(*) fix log format specifier of 'ssize_t' arguments feat(proxy-wasm) implement initial metrics facilities refactor(shm/kv) allow retrieving items by key hash fix(proxy-wasm) resume content phase after request_body read EAGAIN refactor(lua-bridge) remove entry thread sleep timer handling fix(proxy-wasm) cancel dispatches when immediately producing a response feat(proxy-wasm) dispatch errors do not interrupt filter chains refactor(lua-bridge) rewrite for full yielding support fix(lib) prevent a segfault loading an empty .wat module with V8 feat(wasmtime) new 'cache_config' directive for compilation cache feat(proxy-wasm) consistent context checks for all header setters feat(proxy-wasm) allow setting ':status' response pseudo-header refactor(wasm) fix conflicting values in our '*_CONF' definitions feat(http) implement 'postpone_rewrite' + 'postpone_access' directives refactor(wasmx) store ngx_wa_conf_t as our core module context fix(ffi) allow 'load()' to fail and be invoked again fix(shm/kv) ensure memory realloc when value is replaced by a larger one feat(*) implement ipc modules & generalize WasmX namespace Changelog author can paste the list in CHANGELOG.md and filter-out/format the last bits. --- Makefile | 6 +++++- docs/DEVELOPER.md | 3 ++- util/changelog.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100755 util/changelog.sh diff --git a/Makefile b/Makefile index 072d48402..45f5667c1 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ update: .PHONY: todo todo: - @/bin/grep -rIFn -- 'TODO' src/ t/ + @/bin/grep -rIFn -- 'TODO' src/ lib/ t/ util/ .PHONY: act-build act-build: @@ -93,6 +93,10 @@ act-build: act: act-build @act --reuse --pull=false +.PHONY: changelog +changelog: + @util/changelog.sh + .PHONY: coverage coverage: clean NGX_BUILD_GCOV=1 make diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md index 454b5c04c..4ce6085f3 100644 --- a/docs/DEVELOPER.md +++ b/docs/DEVELOPER.md @@ -174,8 +174,9 @@ release artifacts). | `lint` | Lint the sources and test cases | `reindex` | Automatically format the `.t` test files | `update` | Run `cargo update` in all workspaces -| `todo` | Search the project for "TODOs" (source + tests) +| `todo` | Search the project for "TODOs" (source, tests, scripts) | `act` | Build and run the CI environment +| `changelog` | Print all changelog-worthy commits since the last release | `clean` | Clean the latest build | `cleanup` | Does `clean` and also cleans some more of the build environment to free-up disk space | `cleanall` | Destroy the build environment diff --git a/util/changelog.sh b/util/changelog.sh new file mode 100755 index 000000000..8c04e31ff --- /dev/null +++ b/util/changelog.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -e + +SCRIPT_NAME=$(basename $0) +NGX_WASM_DIR=${NGX_WASM_DIR:-"$( + cd $(dirname $(dirname ${0})) + pwd -P +)"} +if [[ ! -f "${NGX_WASM_DIR}/util/_lib.sh" ]]; then + echo "Unable to source util/_lib.sh" >&2 + exit 1 +fi + +source $NGX_WASM_DIR/util/_lib.sh + +############################################################################### + +cd $NGX_WASM_DIR + +# TODO: be smarter about grabbing the proper tag once we have more than just +# prerelease tags +LATEST_TAG=$(git describe --tags --abbrev=0) + +# Only show user-facing commits. Include refactor(), misc() and use best +# judgement whether or not to include them in the final release description). +git --no-pager log --format=oneline $LATEST_TAG.. \ | sed "s/^[^ ]* //" \ | + $(which grep) -v -E '^(chore|tests|style|hotfix|docs)'