Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.0.2
  • v1.0.3
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.3.4
17 results

Target

Select target project
  • oss/libraries/go/network/http-negotiation
1 result
Select Git revision
  • master
  • v1.0.0
  • v1.0.1
  • v1.0.2
  • v1.0.3
  • v1.1.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.2.4
  • v1.2.5
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.3.4
17 results
Show changes
Commits on Source (5)
{{ 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
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
<a name="v1.2.0"></a>
## [v1.2.0] - 2022-09-18
### Changes
- chore makefile and changelog
<a name="v1.1.0"></a>
## [v1.1.0] - 2022-09-13
<a name="v1.0.3"></a>
## [v1.0.3] - 2022-09-12
### Bug Fixes
- bugfix doc
<a name="v1.0.2"></a>
## [v1.0.2] - 2022-09-12
### Add Features
- add documentation
<a name="v1.0.1"></a>
## [v1.0.1] - 2022-09-12
<a name="v1.0.0"></a>
## v1.0.0 - 2022-09-11
[v1.2.0]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.1.0...v1.2.0
[v1.1.0]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.3...v1.1.0
[v1.0.3]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.2...v1.0.3
[v1.0.2]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.1...v1.0.2
[v1.0.1]: https://gitlab.schukai.com/oss/libraries/go/application/configuration/compare/v1.0.0...v1.0.1
......@@ -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 chmod +x $(VERSION_BIN_PATH))
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
CHANGELOG_FILE ?= $(PROJECT_ROOT)CHANGELOG.md
ifeq ("$(wildcard $(RELEASE_FILE))","")
$(shell echo '{"version":"0.1.0"}' > $(RELEASE_FILE))
......@@ -72,21 +79,18 @@ PROJECT_VERSION ?= $(shell cat $(RELEASE_FILE) | jq -r .version)
PROJECT_BUILD_DATE ?= $(shell $(VERSION_BIN) date)
.PHONY: next-patch-version
## create next patch version
next-patch-version: check-clean-repo
echo "Creating next 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)"
.PHONY: next-minor-version
## create next minor version
next-minor-version: check-clean-repo
echo "Creating next minor 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)"
.PHONY: next-major-version
## create next major version
next-major-version: check-clean-repo
echo "Creating next minor version"
$(VERSION_BIN) major --path $(RELEASE_FILE) --selector "version"
......@@ -100,18 +104,38 @@ check-clean-repo:
tag-patch-version: next-patch-version
echo "Tagging patch 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)"
## tag repository with next minor version
tag-minor-version: next-minor-version
echo "Tagging minor 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)"
## tag repository with next major version
tag-major-version: next-major-version
echo "Tagging major 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)"
GO_MOD_FILE := $(SOURCE_PATH)go.mod
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: fetch-licenses
## Fetch licenses for all modules
fetch-licenses:
go-licenses save $(GO_CURRENT_MODULE) --ignore gitlab.schukai.com --force --save_path $(PROJECT_ROOT)licenses/ ; cd -
## HTTP Negotiation
## Installation
```shell
go get gitlab.schukai.com/oss/libraries/go/network/http-negotiation
```
**Note:** This library uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.
## What do this library?
This library provides a simple way to negotiate the content type of HTTP request.
......@@ -19,6 +11,14 @@ It supports:
* [x] [Accept-Charset](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset)
* [x] [Accept-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding)
## Installation
```shell
go get gitlab.schukai.com/oss/libraries/go/network/http-negotiation
```
**Note:** This library uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies.
## Usage
### Content Negotiation
......@@ -136,23 +136,37 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
```
## Changelog
## Contributing
### 1.1.0
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.**
* Add `ContentType` function
Versioning is done with [SemVer](https://semver.org/).
Changelog is generated with [git-chglog](https://github.com/git-chglog/git-chglog#git-chglog)
### 1.0.0
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:
* Initial release
- **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
## Contributing
The footer would be used for a reference to an issue or a breaking change.
Merge requests are welcome. For major changes, please open an issue first to discuss what
you would like to change.
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.
Please make sure to update tests as appropriate.
the following is an example of a commit message:
```text
feat: add 'extras' field
```
## License
[AGPL-3.0](https://choosealicense.com/licenses/agpl-3.0/)
\ No newline at end of file
[AGPL-3.0](https://choosealicense.com/licenses/agpl-3.0/)
{"version":"1.1.0"}
{"version":"1.2.0"}