Skip to content

Commit

Permalink
Using - instead of + for pre-releases for docker compat (#975)
Browse files Browse the repository at this point in the history
* Using - instead of + for pre-releases for docker compat
* Using easier regex for docker tagger image auto-deploy
  • Loading branch information
AnomalRoil committed Apr 27, 2022
1 parent 3231638 commit d9414cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish_tagged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_dispatch:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+(\\+**)?"
- 'v*'
release:
types:
- created
tags:
- "v[0-9]+.[0-9]+.[0-9]+(\\+**)?"
- 'v*'

jobs:
tagged-deploy:
Expand Down
2 changes: 1 addition & 1 deletion common/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (v Version) ToProto() *pbcommon.NodeVersion {
func (v Version) String() string {
pre := ""
if v.Prerelease != "" {
pre = "+"
pre = "-"
}
return fmt.Sprintf("%d.%d.%d%s%s", v.Major, v.Minor, v.Patch, pre, v.Prerelease)
}
4 changes: 2 additions & 2 deletions common/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestVersionStringPre(t *testing.T) {
}

actual := version.String()
expected := "1.2.3+pre"
expected := "1.2.3-pre"

if actual != expected {
t.Fatalf("Incorrect version string. Actual: %s, expected: %s", actual, expected)
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestVersionCompatible(t *testing.T) {
Major: 1,
Minor: 2,
Patch: 3,
Prerelease: "+pre",
Prerelease: "pre",
}

version130 := Version{
Expand Down

0 comments on commit d9414cc

Please sign in to comment.