Skip to content

Commit

Permalink
Merge pull request #203 from crazy-max/san-fix
Browse files Browse the repository at this point in the history
Sanitize tag earlier
  • Loading branch information
crazy-max committed May 5, 2022
2 parents f206c36 + 2f5b5ae commit 69f6fc9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/meta.ts
Expand Up @@ -312,6 +312,7 @@ export class Meta {
if (val.length == 0) {
return version;
}
val = Meta.sanitizeTag(val);
if (version.main == undefined) {
version.main = val;
} else if (val !== version.main) {
Expand Down Expand Up @@ -424,9 +425,9 @@ export class Meta {
}
const tags: Array<string> = [];
for (const imageName of this.getImageNames()) {
tags.push(`${imageName}:${Meta.sanitizeTag(this.version.main)}`);
tags.push(`${imageName}:${this.version.main}`);
for (const partial of this.version.partial) {
tags.push(`${imageName}:${Meta.sanitizeTag(partial)}`);
tags.push(`${imageName}:${partial}`);
}
if (this.version.latest) {
const latestTag = `${this.flavor.prefixLatest ? this.flavor.prefix : ''}latest${this.flavor.suffixLatest ? this.flavor.suffix : ''}`;
Expand Down

0 comments on commit 69f6fc9

Please sign in to comment.