Compare commits
2 Commits
6ee6e10621
...
v0.7.1
Author | SHA1 | Date | |
---|---|---|---|
932d5c380f | |||
f84d76badf |
3
.changes/v0.7.1.md
Normal file
3
.changes/v0.7.1.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
## v0.7.1 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Incorrect local config file loading logic caused files to not be detected
|
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@ -25,16 +25,15 @@ jobs:
|
|||||||
cache: true
|
cache: true
|
||||||
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
# More assembly might be required: Docker logins, GPG, etc. It all depends
|
||||||
# on your needs.
|
# on your needs.
|
||||||
- name: Get tag
|
- uses: olegtarasov/get-tag@v2.1.4
|
||||||
id: tag
|
id: tagName
|
||||||
uses: dawidd6/action-get-tag@v1
|
|
||||||
with:
|
with:
|
||||||
# Optionally strip `v` prefix
|
# tagRegex: "foobar-(.*)" # Optional. Returns specified group text as tag name. Full tag string is returned if regex is not defined.
|
||||||
strip_v: false
|
tagRegexGroup: 1 # Optional. Default is 1.
|
||||||
- uses: goreleaser/goreleaser-action@v4
|
- uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
args: release --release-notes=".changes/${{steps.tag.outputs.tag}}.md" -f .goreleaser/github.yml --clean
|
args: release --release-notes=".changes/${GIT_TAG_NAME}.md" -f .goreleaser/github.yml --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}
|
||||||
|
@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v0.7.1 - 2025-02-14
|
||||||
|
### Fixed
|
||||||
|
* Incorrect local config file loading logic caused files to not be detected
|
||||||
|
|
||||||
## v0.7.0 - 2025-02-11
|
## v0.7.0 - 2025-02-11
|
||||||
### Added
|
### Added
|
||||||
* [feat]: package `packageOperation` option `checkVersion` implemented
|
* [feat]: package `packageOperation` option `checkVersion` implemented
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
const versionStr = "0.7.0"
|
const versionStr = "0.7.1"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
versionCmd = &cobra.Command{
|
versionCmd = &cobra.Command{
|
||||||
|
@ -85,7 +85,6 @@ func (opts *ConfigOpts) InitConfig() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logging.ExitWithMSG(fmt.Sprintf("error initializing config fetcher: %v", err), 1, nil)
|
logging.ExitWithMSG(fmt.Sprintf("error initializing config fetcher: %v", err), 1, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
if opts.ConfigFilePath != "" {
|
if opts.ConfigFilePath != "" {
|
||||||
loadConfigFile(fetcher, opts.ConfigFilePath, backyKoanf, opts)
|
loadConfigFile(fetcher, opts.ConfigFilePath, backyKoanf, opts)
|
||||||
} else {
|
} else {
|
||||||
@ -109,22 +108,22 @@ func loadConfigFile(fetcher remotefetcher.RemoteFetcher, filePath string, k *koa
|
|||||||
func loadDefaultConfigFiles(fetcher remotefetcher.RemoteFetcher, configFiles []string, k *koanf.Koanf, opts *ConfigOpts) {
|
func loadDefaultConfigFiles(fetcher remotefetcher.RemoteFetcher, configFiles []string, k *koanf.Koanf, opts *ConfigOpts) {
|
||||||
cFileFailures := 0
|
cFileFailures := 0
|
||||||
for _, c := range configFiles {
|
for _, c := range configFiles {
|
||||||
|
opts.ConfigFilePath = c
|
||||||
data, err := fetcher.Fetch(c)
|
data, err := fetcher.Fetch(c)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cFileFailures++
|
cFileFailures++
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := k.Load(rawbytes.Provider(data), yaml.Parser()); err != nil {
|
if data != nil {
|
||||||
cFileFailures++
|
if err := k.Load(rawbytes.Provider(data), yaml.Parser()); err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if cFileFailures == len(configFiles) {
|
if cFileFailures == len(configFiles) {
|
||||||
logging.ExitWithMSG("Could not find any valid config file", 1, nil)
|
logging.ExitWithMSG("Could not find any valid local config file", 1, nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user