Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Configuration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Application
Configuration
Commits
74505089
Verified
Commit
74505089
authored
2 years ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
chore add git-chglog tool and update makefile
parent
368f8620
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.chglog/CHANGELOG.tpl.md
+27
-0
27 additions, 0 deletions
.chglog/CHANGELOG.tpl.md
.chglog/config.yml
+57
-0
57 additions, 0 deletions
.chglog/config.yml
CHANGELOG.md
+17
-0
17 additions, 0 deletions
CHANGELOG.md
Makefile
+13
-3
13 additions, 3 deletions
Makefile
README.md
+24
-7
24 additions, 7 deletions
README.md
with
138 additions
and
10 deletions
.chglog/CHANGELOG.tpl.md
0 → 100755
+
27
−
0
View file @
74505089
{{ 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 -}}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.chglog/config.yml
0 → 100755
+
57
−
0
View file @
74505089
style
:
gitlab
template
:
CHANGELOG.tpl.md
info
:
title
:
CHANGELOG
repository_url
:
https://gitlab.schukai.com/oss/libraries/go/application/configuration
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+)
\\
s.*)$"
pattern_maps
:
-
Subject
-
Type
notes
:
keywords
:
-
BREAKING CHANGE
This diff is collapsed.
Click to expand it.
CHANGELOG.md
0 → 100644
+
17
−
0
View file @
74505089
<a
name=
"v1.1.0"
></a>
## [v1.1.0] - 2022-09-18
### Changes
-
change api HasError() to HasErrors() as it is more logical
<a
name=
"v1.0.1"
></a>
## [v1.0.1] - 2022-09-18
### Bug Fixes
-
bugfix wrong return value of function newUnsupportedReflectKindError
<a
name=
"v1.0.0"
></a>
## v1.0.0 - 2022-09-18
[
v1.1.0
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.1...v1.1.0
[
v1.0.1
]:
https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.0...v1.0.1
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Makefile
+
13
−
3
View file @
74505089
...
@@ -61,8 +61,15 @@ ifndef VERSION_BIN
...
@@ -61,8 +61,15 @@ ifndef VERSION_BIN
$(shell curl -o $(VERSION_BIN_PATH) http
:
//download.schukai.com/tools/version/version-$(shell uname -s | tr [:upper:] [:lower:])-$(shell echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`))
$(shell curl -o $(VERSION_BIN_PATH) http
:
//download.schukai.com/tools/version/version-$(shell uname -s | tr [:upper:] [:lower:])-$(shell echo `uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/`))
$(
shell
chmod
+x
$(
VERSION_BIN_PATH
))
$(
shell
chmod
+x
$(
VERSION_BIN_PATH
))
endif
endif
GIT_CHGLOG_BIN
:=
$(
shell
command
-v
git-chglog 2> /dev/null
)
ifeq
($(GIT_CHGLOG_BIN),)
$(
shell
go
install
github.com/git-chglog/git-chglog/cmd/git-chglog@latest
)
endif
RELEASE_FILE
?=
$(
PROJECT_ROOT
)
release.json
RELEASE_FILE
?=
$(
PROJECT_ROOT
)
release.json
CHANGELOG_FILE
?=
$(
PROJECT_ROOT
)
CHANGELOG.md
ifeq
("$(wildcard $(RELEASE_FILE))","")
ifeq
("$(wildcard $(RELEASE_FILE))","")
$(shell echo '{"version"
:
"0.1.0"}' > $(RELEASE_FILE))
$(shell echo '{"version"
:
"0.1.0"}' > $(RELEASE_FILE))
...
@@ -72,21 +79,18 @@ PROJECT_VERSION ?= $(shell cat $(RELEASE_FILE) | jq -r .version)
...
@@ -72,21 +79,18 @@ PROJECT_VERSION ?= $(shell cat $(RELEASE_FILE) | jq -r .version)
PROJECT_BUILD_DATE
?=
$(
shell
$(
VERSION_BIN
)
date
)
PROJECT_BUILD_DATE
?=
$(
shell
$(
VERSION_BIN
)
date
)
.PHONY
:
next-patch-version
.PHONY
:
next-patch-version
## create next patch version
next-patch-version
:
check-clean-repo
next-patch-version
:
check-clean-repo
echo
"Creating next version"
echo
"Creating next version"
$(
VERSION_BIN
)
patch
--path
$(
RELEASE_FILE
)
--selector
"version"
$(
VERSION_BIN
)
patch
--path
$(
RELEASE_FILE
)
--selector
"version"
git add
$(
RELEASE_FILE
)
&&
git commit
-m
"Bump version to
$$(
cat
$(
RELEASE_FILE
)
| jq -r .version
)
"
git add
$(
RELEASE_FILE
)
&&
git commit
-m
"Bump version to
$$(
cat
$(
RELEASE_FILE
)
| jq -r .version
)
"
.PHONY
:
next-minor-version
.PHONY
:
next-minor-version
## create next minor version
next-minor-version
:
check-clean-repo
next-minor-version
:
check-clean-repo
echo
"Creating next minor version"
echo
"Creating next minor version"
$(
VERSION_BIN
)
minor
--path
$(
RELEASE_FILE
)
--selector
"version"
$(
VERSION_BIN
)
minor
--path
$(
RELEASE_FILE
)
--selector
"version"
git add
$(
RELEASE_FILE
)
&&
git commit
-m
"Bump version to
$$(
cat
$(
RELEASE_FILE
)
| jq -r .version
)
"
git add
$(
RELEASE_FILE
)
&&
git commit
-m
"Bump version to
$$(
cat
$(
RELEASE_FILE
)
| jq -r .version
)
"
.PHONY
:
next-major-version
.PHONY
:
next-major-version
## create next major version
next-major-version
:
check-clean-repo
next-major-version
:
check-clean-repo
echo
"Creating next minor version"
echo
"Creating next minor version"
$(
VERSION_BIN
)
major
--path
$(
RELEASE_FILE
)
--selector
"version"
$(
VERSION_BIN
)
major
--path
$(
RELEASE_FILE
)
--selector
"version"
...
@@ -100,18 +104,24 @@ check-clean-repo:
...
@@ -100,18 +104,24 @@ check-clean-repo:
tag-patch-version
:
next-patch-version
tag-patch-version
:
next-patch-version
echo
"Tagging patch version"
echo
"Tagging patch version"
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
git-chglog
--next-tag
v
$(
PROJECT_VERSION
)
-o
$(
CHANGELOG_FILE
)
git add
$(
CHANGELOG_FILE
)
&&
git commit
-m
"Update changelog"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
## tag repository with next minor version
## tag repository with next minor version
tag-minor-version
:
next-minor-version
tag-minor-version
:
next-minor-version
echo
"Tagging minor version"
echo
"Tagging minor version"
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
git-chglog
--next-tag
v
$(
PROJECT_VERSION
)
-o
$(
CHANGELOG_FILE
)
git add
$(
CHANGELOG_FILE
)
&&
git commit
-m
"Update changelog"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
## tag repository with next major version
## tag repository with next major version
tag-major-version
:
next-major-version
tag-major-version
:
next-major-version
echo
"Tagging major version"
echo
"Tagging major version"
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
$(
eval
PROJECT_VERSION :
=
$(
shell
cat
$(
RELEASE_FILE
)
| jq
-r
.version
))
git-chglog
--next-tag
v
$(
PROJECT_VERSION
)
-o
$(
CHANGELOG_FILE
)
git add
$(
CHANGELOG_FILE
)
&&
git commit
-m
"Update changelog"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
git tag
-a
v
$(
PROJECT_VERSION
)
-m
"Version
$(
PROJECT_VERSION
)
"
GO_MOD_FILE
:=
$(
SOURCE_PATH
)
go.mod
GO_MOD_FILE
:=
$(
SOURCE_PATH
)
go.mod
...
...
This diff is collapsed.
Click to expand it.
README.md
+
24
−
7
View file @
74505089
...
@@ -342,19 +342,36 @@ If an error occurs, it is returned by the function `Errors()`. The errors can be
...
@@ -342,19 +342,36 @@ If an error occurs, it is returned by the function `Errors()`. The errors can be
The
`HasErrors()`
function can be used to check whether errors have occurred.
The
`HasErrors()`
function can be used to check whether errors have occurred.
## Contributing
## Change Log
Merge requests are welcome. For major changes, please open an issue first to discuss what
you would like to change.
**Please make sure to update tests as appropriate.**
### 1.0.0
Versioning is done with
[
SemVer
](
https://semver.org/
)
.
Changelog is generated with
[
git-chglog
](
https://github.com/git-chglog/git-chglog#git-chglog
)
*
Initial release
Commit messages should follow the
[
Conventional Commits
](
https://www.conventionalcommits.org/en/v1.0.0/
)
specification.
Messages are started with a type, which is one of the following:
## Contributing
-
**feat**
: A new feature
-
**fix**
: A bug fix
-
**doc**
: Documentation only changes
-
**refactor**
: A code change that neither fixes a bug nor adds a feature
-
**perf**
: A code change that improves performance
-
**test**
: Adding missing or correcting existing tests
-
**chore**
: Other changes that don't modify src or test files
Merge requests are welcome. For major changes, please open an issue first to discuss what
The footer would be used for a reference to an issue or a breaking change.
you would like to change.
Please make sure to update tests as appropriate.
A commit that has a footer
`BREAKING CHANGE:`
, or appends a ! after the type/scope,
introduces a breaking API change (correlating with MAJOR in semantic versioning).
A BREAKING CHANGE can be part of commits of any type.
the following is an example of a commit message:
```
text
feat: add 'extras' field
```
## License
## License
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment