updatecli / updatecli

A Declarative Dependency Management tool
https://www.updatecli.io
Apache License 2.0
556 stars 65 forks source link

gitTag resource is broken + gitHubrelease does not filter when falling back to git tag #416

Closed dduportal closed 2 years ago

dduportal commented 2 years ago

Describe the bug

The GitHub Actions run https://github.com/updatecli/updatecli/runs/4531357392?check_suite_focus=true fails because it gets a source version for golang which is go-1.18beta1 which is unexpected.

The manifest file at https://github.com/updatecli/updatecli/blob/7ab1dad47464117af5aea0e6c1a648900a8511a7/updatecli/updatecli.d/golang.yaml#L13 defines a pattern constraint that should not catch go-1.18beta1 but go-1.17.5 instead.

I guess it's related to #182 : as there are no github release in https://github.com/golang/go, then updatecli falls back to git tags. But the pattern filtering is NOT applied to this fallback, which causes this bug.

I wanted to switch to using pure git tags but:

SOURCES
=======

latestGoVersion
---------------
WARNING: no git tag message specified
Searching for version matching pattern "latest"
βœ— No Git Tag found matching pattern "latest"
ERROR: βœ— no Git tag found matching pattern "latest"

Steps to Reproduce

See bug description: there is a permalink to the failing manifest. You can only keep the first source of this manifest file to reproduce quickly.

Expected behavior

Either:

Screenshots

Version

Additional context

dduportal commented 2 years ago

Closing, thanks to @lemeurherve 's help!

The pattern is badly shaped and should be: ^go-1\.(\d*)\.(\d*)$: