Open brlin-tw opened 3 months ago
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.
@jnsgruk
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.
The Create tag
step also depends on the version
output from the snapcraft-yaml job so more changes need to be done in order for this to work.
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.