diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md
deleted file mode 100755
index 9b6d3009..00000000
--- a/.chglog/CHANGELOG.tpl.md
+++ /dev/null
@@ -1,82 +0,0 @@
-# CHANGELOG
-
-{{ if .Versions -}}
-{{ if .Unreleased.CommitGroups -}}
-
-## [Unreleased]
-{{ range .Unreleased.CommitGroups -}}
-### {{ .Title }}
-{{ range .Commits -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{- if .Unreleased.NoteGroups -}}
-{{ range .Unreleased.NoteGroups -}}
-### {{ .Title }}
-{{ range .Notes }}
-{{ .Body }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-
-{{ range .Versions -}}
-
-## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
-{{ if eq .Tag.Name "v0.1.0" -}}
-- first release
-
-{{ else if eq .Tag.Name "v0.6.0" -}}
-### Bug Fixes
-- **template:** enable to set to pointer values
-
-### Features
-- export RunScenario function
-- add WithScenariosFromReader option
-- allow template in header assertion
-- **assert:** add regexp function
-- **context:** add ScenarioFilePath
-
-{{ else if not .CommitGroups -}}
-- bump up the version of dependent modules
-
-{{ else -}}
-{{ range .CommitGroups -}}
-### {{ .Title }}
-{{ range .Commits -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-
-{{ if eq .Tag.Name "v0.6.0" -}}
-{{ else -}}
-{{- if .RevertCommits -}}
-### Reverts
-{{ range .RevertCommits -}}
-- {{ .Revert.Header }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-
-{{- if .NoteGroups -}}
-{{ range .NoteGroups -}}
-### {{ .Title }}
-{{ range .Notes }}
-{{ .Body }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
-
-{{- if .Versions }}
-{{ if .Unreleased.CommitGroups -}}
-[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
-{{ end -}}
-{{ range .Versions -}}
-{{ if .Tag.Previous -}}
-[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
diff --git a/.chglog/config.yml b/.chglog/config.yml
deleted file mode 100755
index 588ebe5f..00000000
--- a/.chglog/config.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-style: github
-template: CHANGELOG.tpl.md
-info:
- title: CHANGELOG
- repository_url: https://github.com/zoncoen/scenarigo
-options:
- tag_filter_pattern: '^v[0-9.]+$'
- sort: "date"
- commits:
- filters:
- Type:
- - feat
- - fix
- - perf
- - refactor
- commit_groups:
- title_maps:
- feat: Features
- fix: Bug Fixes
- perf: Performance Improvements
- refactor: Code Refactoring
- header:
- pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
- pattern_maps:
- - Type
- - Scope
- - Subject
- notes:
- keywords:
- - BREAKING CHANGE
diff --git a/.github/release.yml b/.github/release.yml
new file mode 100644
index 00000000..d9b2b4f6
--- /dev/null
+++ b/.github/release.yml
@@ -0,0 +1,30 @@
+changelog:
+ exclude:
+ labels:
+ - tagpr
+ - chore
+ categories:
+ - title: New Features
+ labels:
+ - enhancement
+ - title: Behavior Changes
+ labels:
+ - behavior change
+ - title: Bug Fixes
+ labels:
+ - bug fix
+ - title: Code Refactoring
+ labels:
+ - refactoring
+ - title: Dependency Upgrades
+ labels:
+ - dependencies
+ - title: Testing
+ labels:
+ - testing
+ - title: Documentation
+ labels:
+ - documentation
+ - title: Other Changes
+ labels:
+ - "*"
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8df38213..7e15378e 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -82,14 +82,11 @@ jobs:
cat ./dist/**/*_checksums.txt > ./assets/checksums.txt
mv ./dist/**/*.tar.gz ./assets/
ls ./assets/
- - name: Generate CHANGELOG
- working-directory: ./go/src/github.com/${{ github.repository }}
- run: RELEASE_VERSION=${{ github.ref_name }} make changelog/ci && cat .CHANGELOG.md
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
- args: release --clean --release-notes .CHANGELOG.md -f ./scripts/cross-build/.goreleaser.yml
+ args: release --clean -f ./scripts/cross-build/.goreleaser.yml
workdir: ./go/src/github.com/${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 32339708..4d179f2d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,16 +1,13 @@
# CHANGELOG
-
## [v0.17.3] - 2024-04-14
### Bug Fixes
- **release:** ensure the Docker image exists ([#411](https://github.com/zoncoen/scenarigo/issues/411))
-
## [v0.17.2] - 2024-03-21
### Features
- add an option to output test summary at last ([#395](https://github.com/zoncoen/scenarigo/issues/395))
-
## [v0.17.1] - 2024-02-26
### Bug Fixes
- **assert:** fix retry failure if using left arrow functions for assertion
@@ -21,7 +18,6 @@
- bump the minimum go version
- **plugin:** set GOTOOLCHAIN env for building plugins
-
## [v0.17.0] - 2024-01-26
### Bug Fixes
- **assert:** fix errors when using assert.(and|or)
@@ -37,17 +33,14 @@
template.Executefunction requires a context.Context value as an argument to avoid a goroutine leak.
-
## [v0.16.2] - 2023-11-02
### Bug Fixes
- **template:** don't convert int to string
-
## [v0.16.1] - 2023-11-01
### Features
- **grpc:** dump invalid utf8 strings as hex
-
## [v0.16.0] - 2023-10-24
### Bug Fixes
- don't panic if the protocol is empty
@@ -68,12 +61,10 @@ template.Executefunction requires a context.Context value as an argument to avoi
assert.Build function requires a context.Context value as an argument to avoid a goroutine leak.
-
## [v0.15.1] - 2023-09-15
### Code Refactoring
- remove workaround
-
## [v0.15.0] - 2023-09-06
### Bug Fixes
- **plugin:** setup plugins in the order in which they are registered
@@ -92,16 +83,13 @@ assert.Build function requires a context.Context value as an argument to avoid a
- **template:** add time and duration type
- **template:** add bytes type
-
## [v0.14.2] - 2023-03-03
- bump up the version of dependent modules
-
## [v0.14.1] - 2023-02-27
### Features
- **schema:** add Comments field
-
## [v0.14.0] - 2023-02-20
### Bug Fixes
- pass bound variables to the next step
@@ -118,15 +106,12 @@ assert.Build function requires a context.Context value as an argument to avoid a
- **http:** enable decoding of response bodies with character encodings other than utf-8
- **http:** add text/html unmarshaler
-
## [v0.13.2] - 2022-12-16
- bump up the version of dependent modules
-
## [v0.13.1] - 2022-12-15
- bump up the version of dependent modules
-
## [v0.13.0] - 2022-12-08
### Bug Fixes
- enable to specify report paths by absolute path
@@ -137,41 +122,34 @@ assert.Build function requires a context.Context value as an argument to avoid a
- enable to marshal schema.Config to YAML
- **errors:** change error message format
-
## [v0.12.8] - 2022-10-18
### Bug Fixes
- don't bind vars if included scenario failed
-
## [v0.12.7] - 2022-09-27
### Features
- **template:** enable to call methods
-
## [v0.12.6] - 2022-09-13
### Features
- enable to specify step timeout
- **grpc:** enable to use template in error details
- **http:** make method name case-insensitive
-
## [v0.12.5] - 2022-08-22
### Bug Fixes
- **plugin:** go mod tidy with -compat option
-
## [v0.12.4] - 2022-07-25
### Bug Fixes
- **plugin:** enable to replace modules to local paths
- **plugin:** keep replace directives
-
## [v0.12.3] - 2022-07-21
### Bug Fixes
- **plugin:** remove plugin modules from the cache
- **plugin:** check remote module source versions
-
## [v0.12.2] - 2022-07-20
### Bug Fixes
- **mock:** fix nil error bug
@@ -181,12 +159,10 @@ assert.Build function requires a context.Context value as an argument to avoid a
- fix maintidx error
- fix cyclop error
-
## [v0.12.1] - 2022-06-26
### Bug Fixes
- **release:** reduce target Go versions
-
## [v0.12.0] - 2022-06-13
### Bug Fixes
- **plugin:** suppress unnecessary plugin build logs
@@ -195,18 +171,15 @@ assert.Build function requires a context.Context value as an argument to avoid a
### Features
- **template:** allow functions to return an error
-
## [v0.11.2] - 2022-04-26
### Bug Fixes
- **plugin:** allow specifying sub directories of remote modules as src
-
## [v0.11.1] - 2022-04-18
### Bug Fixes
- print error if fail to open plugin
- **doc:** setup field was deprecated
-
## [v0.11.0] - 2022-04-15
### Bug Fixes
- **plugin:** fix issue with plugin build failure in Go1.18
@@ -218,7 +191,6 @@ assert.Build function requires a context.Context value as an argument to avoid a
- **template:** enable to use template in map keys
- **template:** enable to escape { by \
-
## [v0.10.0] - 2022-01-31
### Bug Fixes
- update the go directive of go.mod
@@ -228,7 +200,6 @@ assert.Build function requires a context.Context value as an argument to avoid a
This package requires Go 1.17 or later.
-
## [v0.9.0] - 2021-12-03
### Bug Fixes
- **errors:** Errors returns nil if no errors
@@ -245,7 +216,6 @@ This package requires Go 1.17 or later.
- **plugin:** enable to build plugin from remote "go gettable" src
- **template:** add bool literals
-
## [v0.8.1] - 2021-09-27
### Bug Fixes
- add workaround to avoid the bug of Go 1.17
@@ -261,7 +231,6 @@ This package requires Go 1.17 or later.
"file" and "verbose" options are removed from the list sub-command.
-
## [v0.8.0] - 2021-09-08
### Bug Fixes
- enable CGO on release build
@@ -277,7 +246,6 @@ This package requires Go 1.17 or later.
- **template:** execute templates of data
- **version:** get version from build info
-
## [v0.7.0] - 2021-07-30
### Bug Fixes
- **assert:** fix the assertion operators
@@ -306,12 +274,10 @@ This package requires Go 1.17 or later.
This package requires Go 1.16 or later.
-
## [v0.6.3] - 2021-04-08
### Bug Fixes
- enable to bind vars defined in the included scenario
-
## [v0.6.2] - 2021-04-07
### Bug Fixes
- **plugin:** avoid the error caused by loading plugins concurrently ([#78](https://github.com/zoncoen/scenarigo/issues/78))
@@ -325,12 +291,10 @@ This package requires Go 1.16 or later.
- **reporter:** enable to generate test report ([#83](https://github.com/zoncoen/scenarigo/issues/83))
- **reporter:** include the execution time of sub-tests ([#82](https://github.com/zoncoen/scenarigo/issues/82))
-
## [v0.6.1] - 2021-01-14
### Bug Fixes
- **template:** don't convert invalid values to avoid panic
-
## [v0.6.0] - 2021-01-12
### Bug Fixes
- **template:** enable to set to pointer values
@@ -342,7 +306,6 @@ This package requires Go 1.16 or later.
- **assert:** add regexp function
- **context:** add ScenarioFilePath
-
## [v0.5.1] - 2020-10-23
### Bug Fixes
- **template:** restore funcs in args of left arrow function
@@ -350,7 +313,6 @@ This package requires Go 1.16 or later.
### Features
- **assert:** add "and" function
-
## [v0.5.0] - 2020-10-05
### Features
- **assert:** add "or" function
@@ -358,7 +320,6 @@ This package requires Go 1.16 or later.
- **grpc:** allow using a template as code and msg
- **http:** allow using a template as code
-
## [v0.4.0] - 2020-09-02
### Bug Fixes
- register errdetails proto messages to unmarshal Any
@@ -368,7 +329,6 @@ This package requires Go 1.16 or later.
### Features
- **cmd:** add list sub-command ([#51](https://github.com/zoncoen/scenarigo/issues/51))
-
## [v0.3.3] - 2020-06-17
### Bug Fixes
- **core:** add generated files to avoid the import error ([#41](https://github.com/zoncoen/scenarigo/issues/41))
@@ -377,23 +337,19 @@ This package requires Go 1.16 or later.
- **deps:** update YAML library to fix a bug ( v1.7.9 => v1.7.10 ) ([#40](https://github.com/zoncoen/scenarigo/issues/40))
- **template:** fix processing for variadic arguments of function ([#48](https://github.com/zoncoen/scenarigo/issues/48))
-
## [v0.3.2] - 2020-06-15
### Bug Fixes
- **deps:** update YAML library to fix a bug ( v1.7.8 => v1.7.9 ) ([#39](https://github.com/zoncoen/scenarigo/issues/39))
-
## [v0.3.1] - 2020-06-12
### Bug Fixes
- **core:** fix ctx.Response() for http protocol ([#35](https://github.com/zoncoen/scenarigo/issues/35))
- **errors:** fix incorrect line number in YAML source ([#38](https://github.com/zoncoen/scenarigo/issues/38))
-
## [v0.3.0] - 2020-06-11
### Features
- **core:** support to output error with YAML ([#33](https://github.com/zoncoen/scenarigo/issues/33))
-
## [v0.2.0] - 2020-06-03
### Code Refactoring
- **core:** replace YAML libraries to goccy/go-yaml ([#31](https://github.com/zoncoen/scenarigo/issues/31))
@@ -407,7 +363,6 @@ This package requires Go 1.16 or later.
change protocl.Protocol interface
-
## v0.1.0 - 2020-05-17
- first release
diff --git a/Makefile b/Makefile
index bc1ee72d..2c3f2861 100644
--- a/Makefile
+++ b/Makefile
@@ -60,14 +60,6 @@ MOCKGEN := $(BIN_DIR)/mockgen
$(MOCKGEN): | $(BIN_DIR)
@$(GO) install github.com/golang/mock/mockgen@v1.6.0
-GOBUMP := $(BIN_DIR)/gobump
-$(GOBUMP): | $(BIN_DIR)
- @$(GO) install github.com/x-motemen/gobump/cmd/gobump@afdfbf2804fecf41b963b1cf7fadfa8d81c7d820
-
-GIT_CHGLOG := $(BIN_DIR)/git-chglog
-$(GIT_CHGLOG): | $(BIN_DIR)
- @$(GO) install github.com/git-chglog/git-chglog/cmd/git-chglog@v0.15.2
-
GO_LICENSES := $(BIN_DIR)/go-licenses
$(GO_LICENSES): | $(BIN_DIR)
@$(GO) install github.com/google/go-licenses@v1.6.0
@@ -217,19 +209,6 @@ gen/plugins:
$(GO) build -buildmode=plugin -o $(GEN_PLUGINS_DIR)/$$(basename $$dir).so $$dir; \
done
-.PHONY: release
-release: $(GOBUMP) $(GIT_CHGLOG) ## release new version
- @$(CURDIR)/scripts/release.sh
-
-.PHONY: changelog
-changelog: $(GIT_CHGLOG) ## generate CHANGELOG.md
- @git-chglog --tag-filter-pattern "^v[0-9]+.[0-9]+.[0-9]+$$" -o $(CURDIR)/CHANGELOG.md
-
-RELEASE_VERSION := $(RELEASE_VERSION)
-.PHONY: changelog/ci
-changelog/ci: $(GIT_CHGLOG) $(GOBUMP)
- @git-chglog --tag-filter-pattern "^v[0-9]+.[0-9]+.[0-9]+$$|$(RELEASE_VERSION)" $(RELEASE_VERSION) > $(CURDIR)/.CHANGELOG.md
-
.PHONY: credits
credits: $(GO_LICENSES) $(GOCREDITS) ## generate CREDITS
@$(GO) mod download
diff --git a/README.md b/README.md
index fccdafb1..87c6c42a 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ steps:
### go install command (recommend)
```shell
-$ go install github.com/zoncoen/scenarigo/cmd/scenarigo@v0.17.3
+$ go install github.com/zoncoen/scenarigo/cmd/scenarigo@latest
```
### from release page
@@ -53,7 +53,7 @@ You can download the latest command into the `./scenarigo` directory with the fo
```shell
$ version=$(curl -s https://api.github.com/repos/zoncoen/scenarigo/releases/latest | jq -r '.tag_name') && \
- go_version='go1.22.2' && \
+ go_version=$(echo -n $(curl -s 'https://go.dev/VERSION?m=text' | head -n 1)) && \
curl -sLJ https://github.com/zoncoen/scenarigo/releases/download/${version}/scenarigo_${version}_${go_version}_$(uname)_$(uname -m).tar.gz -o scenarigo.tar.gz && \
mkdir ./scenarigo && tar -zxvf ./scenarigo.tar.gz -C ./scenarigo && rm scenarigo.tar.gz
```
diff --git a/scripts/cross-build/cross-build/templates/goreleaser.yml.tmpl b/scripts/cross-build/cross-build/templates/goreleaser.yml.tmpl
index 916a1610..076a932c 100644
--- a/scripts/cross-build/cross-build/templates/goreleaser.yml.tmpl
+++ b/scripts/cross-build/cross-build/templates/goreleaser.yml.tmpl
@@ -62,4 +62,4 @@ checksum:
snapshot:
name_template: "{{ .Version }}-snapshot"
changelog:
- skip: true
+ use: github-native