2
0
Fork 0
mirror of https://code.forgejo.org/docker/metadata-action.git synced 2025-08-03 16:28:31 +00:00

fix: handle raw statement for pep440 pre-release

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2021-12-06 17:15:06 +01:00
parent 6d7c94a41e
commit aad230bbd9
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
5 changed files with 74 additions and 8 deletions

7
dist/index.js generated vendored
View file

@ -557,7 +557,12 @@ class Meta {
let latest = false;
const pver = pep440.explain(vraw);
if (pver.is_prerelease || pver.is_postrelease || pver.is_devrelease) {
vraw = this.setValue(pep440.clean(vraw), tag);
if (Meta.isRawStatement(tag.attrs['pattern'])) {
vraw = this.setValue(vraw, tag);
}
else {
vraw = this.setValue(pep440.clean(vraw), tag);
}
}
else {
vraw = this.setValue(handlebars.compile(tag.attrs['pattern'])({