Compare commits

...

4 Commits

Author SHA1 Message Date
wpetit ae58f166a3 chore: update changelog
Cadoles/mktools/pipeline/pr-master This commit looks good Details
2023-08-23 14:49:35 -06:00
wpetit d767607db7 feat: add changelog 2023-08-23 12:08:09 -06:00
wpetit 93a8977aeb ci: add jenkins pipeline 2023-08-23 12:08:09 -06:00
wpetit d28cc3a672 fix(changelog): add missing task dependency 2023-08-23 12:06:20 -06:00
8 changed files with 130 additions and 1 deletions

42
.chglog/CHANGELOG.tpl.md Normal file
View File

@ -0,0 +1,42 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]
{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ 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 }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}

33
.chglog/config.yml Normal file
View File

@ -0,0 +1,33 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://forge.cadoles.com/Cadoles/mktools
options:
commits:
filters:
Type:
- feat
- fix
- perf
- refactor
- docs
commit_groups:
title_maps:
feat: Features
fix: Bug Fixes
perf: Performance Improvements
refactor: Code Refactoring
docs: Documentation
header:
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
pattern_maps:
- Type
- Scope
- Subject
notes:
keywords:
- BREAKING CHANGE
issues:
prefix:
- '#'

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
tools/

19
CHANGELOG.md Normal file
View File

@ -0,0 +1,19 @@
<a name="unreleased"></a>
## [Unreleased]
### Bug Fixes
- **changelog:** add missing task dependency
### Features
- add changelog
- add mkt-changelog task
- **gitea-release:** automatically add tools directory to git ignored files
<a name="2023.8.23-stable.1207.cd2f1ba"></a>
## 2023.8.23-stable.1207.cd2f1ba - 2023-08-21
### Features
- initial commit
[Unreleased]: https://forge.cadoles.com/Cadoles/mktools/compare/2023.8.23-stable.1207.cd2f1ba...HEAD

3
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,3 @@
@Library("cadoles") _
standardMakePipeline()

23
Makefile Normal file
View File

@ -0,0 +1,23 @@
.PHONY: all
all: test build
.PHONY: test
test: tools/checkmake/bin/checkmake
tools/checkmake/bin/checkmake Makefile
.PHONY: build
build:
.PHONY: release
release: changelog
$(MAKE) MKT_GITEA_RELEASE_ATTACHMENTS="CHANGELOG.md" mkt-gitea-release
.PHONY: clean
clean:
rm -rf tools
.PHONY: changelog
changelog:
$(MAKE) MKT_GIT_CHGLOG_PROJECT_ORG=Cadoles MKT_GIT_CHGLOG_PROJECT_NAME=mktools mkt-changelog
include tasks/*.mk

View File

@ -95,7 +95,7 @@ EOF
endef endef
export MKT_GIT_CHGLOG_TEMPLATE_SCRIPT = $(value _MKT_GIT_CHGLOG_TEMPLATE_SCRIPT) export MKT_GIT_CHGLOG_TEMPLATE_SCRIPT = $(value _MKT_GIT_CHGLOG_TEMPLATE_SCRIPT)
mkt-changelog: .chglog/config.yml .chglog/CHANGELOG.tpl.md mkt-changelog: tools/git-chglog/bin/git-chglog .chglog/config.yml .chglog/CHANGELOG.tpl.md
tools/git-chglog/bin/git-chglog --output CHANGELOG.md $(MKT_GIT_CHGLOG_ARGS) tools/git-chglog/bin/git-chglog --output CHANGELOG.md $(MKT_GIT_CHGLOG_ARGS)
.chglog/config.yml: .chglog/config.yml:

8
tasks/checkmake.mk Normal file
View File

@ -0,0 +1,8 @@
MKT_CHECKMAKE_VERSION ?= 0.2.2
MKT_CHECKMAKE_URL ?= https://github.com/mrtazz/checkmake/releases/download/$(MKT_CHECKMAKE_VERSION)/checkmake-$(MKT_CHECKMAKE_VERSION).linux.amd64
tools/checkmake/bin/checkmake:
mkdir -p tools/checkmake/bin
grep -qF -- "tools/" ".gitignore" 2>/dev/null || echo "tools/" >> ".gitignore"
curl -sL -o tools/checkmake/bin/checkmake "$(MKT_CHECKMAKE_URL)"
chmod +x tools/checkmake/bin/checkmake