Skip to content

Commit 995bfd1

Browse files
committed
before adding a new tag validate that is normalized
1 parent 1053de1 commit 995bfd1

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## [0.7.2]
4+
5+
### Fixed
6+
- In docker build command, before adding a new tag validate that is normalized
7+
38
## [0.7.1]
49

510
### Fixed

RELEASE_NOTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RELEASE NOTES
22

3-
## [0.7.1]
3+
## [0.7.2]
44

55
### Fixed
6-
- Existing labels could not be overwritten
6+
- In docker build command, before adding a new tag validate that is normalized

pkg/build/build.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ func (b *DockerBuildCmd) AddTags(tags ...string) error {
228228

229229
for _, tag := range tags {
230230
if b.UseNormalizedNamed {
231-
normalizedTag, _ := reference.ParseNormalizedNamed(tag)
231+
normalizedTag, err := reference.ParseNormalizedNamed(tag)
232+
if err != nil {
233+
return errors.New("(build::AddTags)", fmt.Sprintf("Tag '%s' could not be normalized", tag), err)
234+
}
232235
tag = normalizedTag.String()
233236
}
234237
b.ImageBuildOptions.Tags = append(b.ImageBuildOptions.Tags, tag)

0 commit comments

Comments
 (0)