mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-24 23:00:39 +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
|
||||
}
|
||||
|
||||
if version.PreRelease != "" || version.Metadata != "" {
|
||||
if version.PreRelease != "" {
|
||||
return []string{
|
||||
version.String(),
|
||||
}, nil
|
||||
|
@ -32,8 +32,10 @@ func TestDefaultTags(t *testing.T) {
|
||||
{"refs/heads/main", []string{"latest"}},
|
||||
{"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/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-alpha.1", []string{"1.0.0-alpha.1"}},
|
||||
{"refs/tags/v1.0.0-alpha", []string{"1.0.0-alpha"}},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Loading…
Reference in New Issue
Block a user