Skip to content

Commit

Permalink
chore(util) new 'changelog' script and Makefile target
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thibaultcha committed Jun 25, 2024
1 parent ef0405f commit 119787b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions util/changelog.sh
Original file line number Diff line number Diff line change
@@ -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)'

0 comments on commit 119787b

Please sign in to comment.