Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: path variable export for gmake 3.81 (#110) #110

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 17 additions & 8 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<type>[(<scope>)][!]': <subject> (<issue>)

[body]

[footer(s)]
Signed-of-by: <author-name> <<author-email>>
```


## Commit types
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].106
GOMAKE_DEP ?= github.com/tkrop/[email protected].107
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto
# Request targets from go-make targets target.
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <target>...
Expand All @@ -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.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.106
0.0.107
2 changes: 1 addition & 1 deletion config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].106
GOMAKE_DEP ?= github.com/tkrop/[email protected].107
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto
# Request targets from go-make targets target.
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \
Expand Down
7 changes: 5 additions & 2 deletions config/Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -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/[email protected].106
GOMAKE_DEP := github.com/tkrop/[email protected].107
GOMAKE_MAKEFILE := $(realpath $(firstword $(MAKEFILE_LIST)))
GOMAKE_MAKEFILES := $(GOMAKE_MAKEFILE) \
$(wildcard Makefile.vars) $(wildcard Makefile.ext)
Expand Down Expand Up @@ -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; \
Expand Down
4 changes: 2 additions & 2 deletions internal/make/fixtures/git-verify/msg-failed.err
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>; author=John Doe <[email protected]>]
failure: git-verify message ../internal/make/fixtures/git-verify/msg-failed.in [errors=3]
make: *** [go-make/config/Makefile.base: git-verify] Error 1
Expand Down
2 changes: 1 addition & 1 deletion internal/make/fixtures/git-verify/msg-failed.in
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
Loading