Closed kikito closed 2 weeks ago
I tried running the binary by putting it on my ~/.local/bin path. Unfortunately it is expecting to be able to read changelog-markdown.tmpl from the current path:
changelog-markdown.tmpl
changelog generate --system "Kong" --repo Kong/kong --repo_path ~/code/work/kong/ --changelog_path changelog/unreleased/kong/ > ~/code/work/changelog/3.6.0/3.6.0.md 2024/01/26 17:28:50 Skipping file: .gitkeep (1/77) 2024/01/26 17:28:50 Processing file: add-ai-prompt-decorator-plugin.yml (2/77) 2024/01/26 17:28:51 Processing file: add-ai-prompt-guard-plugin.yml (3/77) 2024/01/26 17:28:51 Processing file: add-ai-prompt-template-plugin.yml (4/77) 2024/01/26 17:28:52 Processing file: add-ai-proxy-plugin.yml (5/77) ... 2024/01/26 17:29:31 Processing file: tracing-sampling-rate-scope.yml (74/77) 2024/01/26 17:29:31 Processing file: validate_private_key.yml (75/77) 2024/01/26 17:29:32 Processing file: wasm-dynamic-properties.yml (76/77) 2024/01/26 17:29:33 Processing file: wasm-injected-shm-kv.yml (77/77) panic: open changelog-markdown.tmpl: no such file or directory goroutine 1 [running]: main.generate(0x1010245?) /github/workspace/main.go:338 +0x2be main.main.func1(0xc00019e000?) /github/workspace/main.go:395 +0x14e github.com/urfave/cli/v2.(*Command).Run(0xc00019e000, 0xc000112780, {0xc0001aa090, 0x9, 0x9}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:274 +0x998 github.com/urfave/cli/v2.(*Command).Run(0xc00019e2c0, 0xc000112640, {0xc000014140, 0xa, 0xa}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:267 +0xbe5 github.com/urfave/cli/v2.(*App).RunContext(0xc00019c000, {0x1492228?, 0x172c920}, {0xc000014140, 0xa, 0xa}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:332 +0x5b7 github.com/urfave/cli/v2.(*App).Run(...) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:309 main.main() /github/workspace/main.go:402 +0x3e5
Suggestion for fix: use go's embed directive: https://pkg.go.dev/embed@master
As a workaround, for now I can download the template in current path so it is available
I tried running the binary by putting it on my ~/.local/bin path. Unfortunately it is expecting to be able to read
changelog-markdown.tmpl
from the current path: