diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 11866c6..fea9c11 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,6 +8,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.23.2 + cache: false - name: Checkout code uses: actions/checkout@v4 diff --git a/MANUAL.md b/MANUAL.md index 140f0bc..2d39cac 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -604,16 +604,25 @@ to define whether also pushed branches should be cleaned up instead of only merged branches. The `git-fix` target supports `(no-)edit` and `(no)-verify` arguments to enable -and disable commit verification and comment editing. The default is to using -verification enabled but disable editing. The default behavior can be defined -by setting providing the `GITFIX` environment variable. +and disable commit verification and comment editing. By default, it is enabling +verification but disabling editing. The default behavior can be defined by +setting providing the `GITFIX` environment variable. The `git-verify` target verifies that commit messages in git log entries are -following a common commit convention containing a [commit types](#commit-types) -as well as a github issue references in the title and are signed-off. The -target allows to validate full git `logs` as well as a single `message` file. -As default the target verifies all commit added to the current branch in -relation to the main branch. +following a common commit convention containing a [commit types](#commit-types), +provide a github issue references in the title, and are signed-off. While the +target allows validating a full git `logs`, it by default, only verifies the +commits added to the current branch in relation to the main branch. The message +is expected to look as follows: + +```text +[()][!]': () + +[body] + +[footer(s)] +Signed-of-by: <> +``` ## Commit types diff --git a/Makefile b/Makefile index 33115c2..7298c60 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) export GOBIN ?= $(GOPATH)/bin # Setup go-make version to use desired build and config scripts. -GOMAKE_DEP ?= github.com/tkrop/go-make@v0.0.106 +GOMAKE_DEP ?= github.com/tkrop/go-make@v0.0.107 INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto # Request targets from go-make targets target. TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ diff --git a/README.md b/README.md index 6195df0..1c00250 100644 --- a/README.md +++ b/README.md @@ -282,29 +282,22 @@ targets as necessary. If we have published a non-working version of [`go-make`][go-make] and your project is not able to build, test, run, etc, the quickest way to reset the -project [Makefile](config/Makefile) working [`go-make`][go-make] version is to -run: +project's [Makefile](config/Makefile) to a working [`go-make`][go-make] version +is to run: ```bash go install github.com/tkrop/go-make@latest; go-make update; ``` If the latest version is not fixed yet, you can also try to move backward -finding the last working [tagged version](tags). - - -## Terms of usage - -This software is open source as is under the MIT license. If you start using -the software, please give it a star, so that I know to be more careful to keep -changes non-breaking. +finding the last working [tagged version](../../tags). ## Building The project is using itself for building as a proof of concept. So either run `make all` or `go-make all`. As fall back it is always possible to directly use -the core [Makefile](Makefile.base) calling: +the core [Makefile](config/Makefile.base) calling: ```bash make -f config/Makefile.base ... @@ -314,8 +307,15 @@ You can also test the local build [`go-make`][go-make] application with the local config. The project compiles itself to use the local config by default. +## Terms of usage + +This software is open source under the MIT license. You can use it without +restrictions and liabilities. Please give it a star, so that I know. If the +project has more than 25 Stars, I will introduce semantic versions `v1`. + + ## Contributing If you like to contribute, please create an issue and/or pull request with a proper description of your proposal or contribution. I will review it and -provide feedback on it as soon as possible. +provide feedback on it as fast as possible. diff --git a/VERSION b/VERSION index 4ff99ed..fbad1dd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.106 +0.0.107 diff --git a/config/Makefile b/config/Makefile index 33115c2..7298c60 100644 --- a/config/Makefile +++ b/config/Makefile @@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) export GOBIN ?= $(GOPATH)/bin # Setup go-make version to use desired build and config scripts. -GOMAKE_DEP ?= github.com/tkrop/go-make@v0.0.106 +GOMAKE_DEP ?= github.com/tkrop/go-make@v0.0.107 INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto # Request targets from go-make targets target. TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ diff --git a/config/Makefile.base b/config/Makefile.base index f71a02e..26ec690 100644 --- a/config/Makefile.base +++ b/config/Makefile.base @@ -46,6 +46,7 @@ endif # System depdendent helper functions. ifeq ("$(shell uname)","Linux") + MAKESHELL := PATH=$(PATH) /bin/bash else ifeq ($(shell uname),Darwin) path-setup = $(shell \ if [ "$(1)" == "opt" ]; then \ @@ -60,6 +61,8 @@ else ifeq ($(shell uname),Darwin) export PATH := $(call path-setup,opt,gawk,awk,$(PATH)) export PATH := $(call path-setup,opt,gsed,sed,$(PATH)) export PATH := $(call path-setup,opt,make,make,$(PATH)) + # Ensure export of path to $(shell ...) in gmake 3.81. + MAKESHELL := PATH=$(PATH) /bin/bash else $(call cerror,unsupported operating system [$(shell uname --all)]) endif @@ -237,7 +240,7 @@ go-pkg = $(shell awk -v mode="$(2)" -v filter="$(3)" \ # Setup go-make to use desired build and config scripts. -GOMAKE_DEP := github.com/tkrop/go-make@v0.0.106 +GOMAKE_DEP := github.com/tkrop/go-make@v0.0.107 GOMAKE_MAKEFILE := $(realpath $(firstword $(MAKEFILE_LIST))) GOMAKE_MAKEFILES := $(GOMAKE_MAKEFILE) \ $(wildcard Makefile.vars) $(wildcard Makefile.ext) @@ -681,7 +684,7 @@ git-clean = \ done; $(GITPRUNE) git-verify = awk -v mode="$(1)" -v author="$(GITAUTHOR)" '$(awk-gensub) \ BEGIN { \ - re_type_suffix = "(\\[[a-z]+\\])?!?: "; \ + re_type_suffix = "((\\[|\\()[a-z]+(\\]|\\)))?!?: "; \ re_type_missing = "^([a-z]+)" re_type_suffix; \ re_type_invalid = "^(" gensub(" ", "|", "g", \ "$(COMMIT_CONVENTION)") ")" re_type_suffix; \ diff --git a/internal/make/fixtures/git-verify/msg-failed.err b/internal/make/fixtures/git-verify/msg-failed.err index 1ced5cd..6e1eac3 100644 --- a/internal/make/fixtures/git-verify/msg-failed.err +++ b/internal/make/fixtures/git-verify/msg-failed.err @@ -1,7 +1,7 @@ warning: please customize variables in go-make/run/Makefile.vars info: executing [make git-verify ARGS="message ../internal/make/fixtures/git-verify/msg-failed.in"] -error: commit type missing [title=feat(wrong): all is somehow wrong (org#1)] -error: issue missing [titel=feat(wrong): all is somehow wrong (org#1)] +error: commit type missing [title=feat{wrong}: all is somehow wrong (org#1)] +error: issue missing [titel=feat{wrong}: all is somehow wrong (org#1)] error: signed-off-by not the author [sign=Signed-off-by: Alice Doe ; author=John Doe ] failure: git-verify message ../internal/make/fixtures/git-verify/msg-failed.in [errors=3] make: *** [go-make/config/Makefile.base: git-verify] Error 1 diff --git a/internal/make/fixtures/git-verify/msg-failed.in b/internal/make/fixtures/git-verify/msg-failed.in index 28f3e28..bd54103 100644 --- a/internal/make/fixtures/git-verify/msg-failed.in +++ b/internal/make/fixtures/git-verify/msg-failed.in @@ -1,3 +1,3 @@ -feat(wrong): all is somehow wrong (org#1) +feat{wrong}: all is somehow wrong (org#1) Signed-off-by: Alice Doe