wolfi-dev / wolfictl

A CLI used to work with the Wolfi OSS project
Apache License 2.0
53 stars 54 forks source link

wolfictl check update github release checker should support full semver for pre-releases #960

Open pnasrat opened 3 months ago

pnasrat commented 3 months ago

For example Python PEP 440 uses pre-release identfiers including a and b

These are compatible with semver but not excluded when wolfictl check update is run

Currently the githubrelease checker uses []string{"alpha", "beta", "rc", "pre"}

https://github.com/wolfi-dev/wolfictl/blob/dc84d81b0556e732b9f8991406b37d017a4c61aa/pkg/update/githubReleases.go#L559

Semver defines pre-releases as

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphens [0-9A-Za-z-]. Identifiers MUST NOT be empty. Numeric identifiers MUST NOT include leading zeroes.

luhring commented 3 months ago

cc: @rawlingsj