mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
parent
2abfefc18c
commit
fc1c7a3c49
@ -36,7 +36,7 @@ var (
|
|||||||
LongVersion string
|
LongVersion string
|
||||||
Extra string
|
Extra string
|
||||||
|
|
||||||
allowedVersionExp = regexp.MustCompile(`^v\d+\.\d+\.\d+(-[a-z0-9]+)*(\.\d+)*(\+\d+-g[0-9a-f]+)?(-[^\s]+)?$`)
|
allowedVersionExp = regexp.MustCompile(`^v\d+\.\d+\.\d+(-[a-z0-9]+)*(\.\d+)*(\+\d+-g[0-9a-f]+|\+[0-9a-z]+)?(-[^\s]+)?$`)
|
||||||
|
|
||||||
envTags = []string{
|
envTags = []string{
|
||||||
"STGUIASSETS",
|
"STGUIASSETS",
|
||||||
|
@ -27,6 +27,11 @@ func TestAllowedVersions(t *testing.T) {
|
|||||||
{"v0.13.0-some-weird-but-allowed-tag", true},
|
{"v0.13.0-some-weird-but-allowed-tag", true},
|
||||||
{"v0.13.0-allowed.to.do.this", true},
|
{"v0.13.0-allowed.to.do.this", true},
|
||||||
{"v0.13.0+not.allowed.to.do.this", false},
|
{"v0.13.0+not.allowed.to.do.this", false},
|
||||||
|
{"v1.27.0+xyz", true},
|
||||||
|
{"v1.27.0-abc.1+xyz", true},
|
||||||
|
{"v1.0.0+45", true},
|
||||||
|
{"v1.0.0-noupgrade", true},
|
||||||
|
{"v1.0.0+noupgrade", true},
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, c := range testcases {
|
for i, c := range testcases {
|
||||||
|
Loading…
Reference in New Issue
Block a user