-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(release-to-candidate): Support projects that doesn't specify the version
property
#46
base: main
Are you sure you want to change the base?
feat(release-to-candidate): Support projects that doesn't specify the version
property
#46
Conversation
… `version` property It is possible that the Snapcraft project doesn't specify the `version` property in the snapcraft.yaml, instead setting the snap version string via the `craftctl set version=_version` mechanism. In this case the parse-snapcraft-yaml job will set the version variable to `null`, making the release-to-candidate job unable to detect the built snap due to filename mismatch. This patch enhances the release-to-candidate job so that the built snap will still be matched via filename matching. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Failing on projects that don't specify a version is more of a design choice than an oversight. Ideally we'd like projects to be pulling versioned releases from tags, and having the version set makes it easier for us to automatically bump versions and trigger rebuilds. |
Yeah this is rather a change for non-Snapcrafters projects(e.g. tesserarct-snap) with a different upstream version select strategy(e.g. selective-checkout) to work without implementing their own release-to-{candidate,beta,edge} GH action jobs. I'm currently working with the Tesseract OCR upstream to re-enable their snap distribution and would like to reuse the Snapcrafters automation when possible. |
Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
The |
…ify the `version` property Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
Avoid parameter expansion result being treated as a filename pattern. Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
It is possible that the Snapcraft project doesn't specify the
version
property in the snapcraft.yaml, instead of setting the snap version string via thecraftctl set version=_version_
mechanism. In this case, the parse-snapcraft-yaml job will set the version variable tonull
, making the release-to-candidate job unable to detect the built snap due to a filename mismatch:This patch enhances the release-to-candidate job so that the built snap will still be matched via filename matching.
Although projects that don't specify the
version
property aren't really compliant with the Snapcrafters policy, supporting this use case allows external projects to reuse the snapcrafters/ci/release-to-candidate GitHub Action job without the need to fork the project.