Skip to content
Snippets Groups Projects
Verified Commit 82eece00 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: update makefiles

parent 1e0db57c
No related branches found
No related tags found
No related merge requests found
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- if .Versions }}
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
style: gitlab
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://gitlab.schukai.com/oss/libraries/go/utilities/data
options:
commits:
filters:
Type:
- feat
- fix
- doc
- refactor
- perf
- test
- chore
## deprecated types and typos
- docs
- documentation
- feat
- added
- add
- bugfix
- revert
- update
- updates
- change
- changed
commit_groups:
title_maps:
feat: Add Features
fix: Bug Fixes
doc: Documentation
refactor: Code Refactoring
perf: Performance Improvements
test: Tests
## Chore is used for all other changes that don't fit in the other categories
chore: Changes
## deprecated types and typos
docs: Documentation
documentation: Documentation
added: Add Features
add: Add Features
bugfix: Bug Fixes
revert: Reverts
update: Changes
updates: Changes
change: Changes
changed: Changes
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
......@@ -17,8 +17,10 @@ endif
ifeq ($(GIT_CHGLOG_BIN),)
$(shell $(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@latest)
GIT_CHGLOG_BIN := $(shell command -v git-chglog 2> /dev/null)
endif
ifneq ($(shell test -d $(GIT_CHGLOG_CONFIG_DIR) && echo -n yes),yes)
$(shell mkdir -p $(GIT_CHGLOG_CONFIG_DIR))
endif
......@@ -135,4 +137,4 @@ $(GIT_CHGLOG_CONFIG_DIR)/CHANGELOG.tpl.md:
## location of CHANGELOG.md file
CHANGELOG_FILE ?= $(PROJECT_ROOT)CHANGELOG.md
EXECUTABLES = $(EXECUTABLES:-) $(GIT_CHGLOG_BIN)
\ No newline at end of file
EXECUTABLES = $(EXECUTABLES:-) $(GIT_CHGLOG_BIN)
......@@ -14,3 +14,14 @@ EXECUTABLES = $(EXECUTABLES:-) $(GO);
ifeq ($(shell command -v $(GO) 2> /dev/null),)
$(error "go is not installed. Please install go <https://go.dev/doc/install>")
endif
GOPATH=$(shell go env GOPATH)
ifeq ($(GOPATH),)
DIRS := bin pkg src
GOPATH=$(DEPLOYMENT_PATH)/go/
$(shell mkdir -p $(GOPATH))
$(shell $(foreach entry,$(DIRS),mkdir -p "$(GOPATH)$(entry)";))
export PATH=$(PATH):$(GOPATH)/bin
endif
......@@ -11,16 +11,22 @@ ifeq ($(GO),)
endif
GO_MOD_FILE := $(SOURCE_PATH)go.mod
GO_LICENSES_BIN := $(shell command -v go-licenses)
ifeq ($(GO_LICENSES_BIN),)
$(shell $(GO) install github.com/google/go-licenses@latest)
GO_LICENSES_BIN := $(shell command -v go-licenses 2> /dev/null)
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif
ifeq ($(shell test -e $(GO_MOD_FILE) && echo -n yes),yes)
GO_CURRENT_MODULE := $(shell cat $(GO_MOD_FILE) | head -n1 | cut -d" " -f2)
# go install github.com/google/go-licenses@latest
EXECUTABLES = $(EXECUTABLES:-) go-licenses;
endif
.PHONY: go-fetch-licenses
## Fetch licenses for all modules
go-fetch-licenses:
go-fetch-licenses:
ifeq ($(GO_CURRENT_MODULE),)
$(QUIET) $(ECHOERRORMARKER) "no go.mod file found, skipping fetching licenses"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment