Apply constraints during "tag" and "push" (since they're only useful after "build", at least currently)

This commit is contained in:
Tianon Gravi 2016-06-07 12:24:01 -07:00
parent 19621bf245
commit 60f6f6dd9e
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ func cmdPush(c *cli.Context) error {
} }
for _, entry := range r.Entries() { for _, entry := range r.Entries() {
if r.SkipConstraints(entry) {
continue
}
for _, tag := range r.Tags(namespace, uniq, entry) { for _, tag := range r.Tags(namespace, uniq, entry) {
fmt.Printf("Pushing %s\n", tag) fmt.Printf("Pushing %s\n", tag)
err = dockerPush(tag) err = dockerPush(tag)

View File

@ -27,6 +27,10 @@ func cmdTag(c *cli.Context) error {
} }
for _, entry := range r.Entries() { for _, entry := range r.Entries() {
if r.SkipConstraints(entry) {
continue
}
for _, tag := range r.Tags("", uniq, entry) { for _, tag := range r.Tags("", uniq, entry) {
namespacedTag := path.Join(namespace, tag) namespacedTag := path.Join(namespace, tag)
fmt.Printf("Tagging %s\n", namespacedTag) fmt.Printf("Tagging %s\n", namespacedTag)