2 Commits

Author SHA1 Message Date
932d5c380f v0.7.1
Some checks failed
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline failed
ci/woodpecker/tag/publish-docs Pipeline was successful
2025-02-14 11:56:46 -06:00
f84d76badf updat GitHube workflow file
All checks were successful
ci/woodpecker/push/publish-docs Pipeline was successful
2025-02-11 23:05:08 -06:00
5 changed files with 19 additions and 14 deletions

3
.changes/v0.7.1.md Normal file
View File

@ -0,0 +1,3 @@
## v0.7.1 - 2025-02-14
### Fixed
* Incorrect local config file loading logic caused files to not be detected

View File

@ -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 }}

View File

@ -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

View File

@ -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{

View File

@ -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)
} }
} }