mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-28 18:20:35 +00:00
fix: ignore version metadata with auto_tag (#60)
This commit is contained in:
parent
b4265d3d97
commit
a75fea4995
@ -55,7 +55,7 @@ func DefaultTags(ref string) ([]string, error) {
|
|||||||
return []string{"latest"}, err
|
return []string{"latest"}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if version.PreRelease != "" || version.Metadata != "" {
|
if version.PreRelease != "" {
|
||||||
return []string{
|
return []string{
|
||||||
version.String(),
|
version.String(),
|
||||||
}, nil
|
}, nil
|
||||||
|
@ -32,8 +32,10 @@ func TestDefaultTags(t *testing.T) {
|
|||||||
{"refs/heads/main", []string{"latest"}},
|
{"refs/heads/main", []string{"latest"}},
|
||||||
{"refs/tags/0.9.0", []string{"0.9", "0.9.0"}},
|
{"refs/tags/0.9.0", []string{"0.9", "0.9.0"}},
|
||||||
{"refs/tags/1.0.0", []string{"1", "1.0", "1.0.0"}},
|
{"refs/tags/1.0.0", []string{"1", "1.0", "1.0.0"}},
|
||||||
|
{"refs/tags/v1.0.0+meta", []string{"1", "1.0", "1.0.0"}},
|
||||||
{"refs/tags/v1.0.0", []string{"1", "1.0", "1.0.0"}},
|
{"refs/tags/v1.0.0", []string{"1", "1.0", "1.0.0"}},
|
||||||
{"refs/tags/v1.0.0-alpha.1", []string{"1.0.0-alpha.1"}},
|
{"refs/tags/v1.0.0-alpha.1", []string{"1.0.0-alpha.1"}},
|
||||||
|
{"refs/tags/v1.0.0-alpha", []string{"1.0.0-alpha"}},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
Loading…
Reference in New Issue
Block a user