Open mamccorm opened 11 months ago
@mamccorm there is a similar conversation here: https://chainguard-dev.slack.com/archives/C0636FTRFED/p1702935348910069. We are working on these and other improvements ;).
Thanks for opening the issue, we want to change the single liner to accept a list (that'd be ideal). That would help our future automation of these bumps and the readability of the package def.
Hey @hectorj2f as for multiline go bump can't we use the YAML multiline string format?
with this bellow change
index f3b6081..e3d90a9 100644
--- a/main.go
+++ b/main.go
@@ -29,6 +29,10 @@ func main() {
replaces = strings.Split(*replacesFlag, " ")
}
+ if strings.HasSuffix(*packagesFlag, "\n") {
+ *packagesFlag = (*packagesFlag)[:len(*packagesFlag)-1]
+ }
+
packages := strings.Split(*packagesFlag, " ")
pkgVersions := []pkgVersion{}
for _, pkg := range packages {
we can use go/bump as
- uses: go/bump
with:
go-version: "1.21"
deps: >
github.com/containerd/containerd@v1.7.11
golang.org/x/crypto@v0.17.0
github.com/go-jose/go-jose/v3@v3.0.1
google.golang.org/grpc@v1.56.3
github.com/docker/docker@v24.0.7
I know it is not the best approach. and it would be much better if we could have a list of packages instead of a single string.
@debasishbsws Yes, the idea is take over this issue during next week. We'll try to find an optimal solution for anyone reading the deps and any of our automated tools relying on this data.
Rather than defining each package on a single line, it'd be nice to be able to split across multiple lines. For example:
This doesn't work as of today, and results in: