Skip to content

Commit

Permalink
Handle new Sourcegraph 0.0.0+dev version (#157)
Browse files Browse the repository at this point in the history
Seems like shortly after we introduced the version check here our format
changed: https://github.com/sourcegraph/sourcegraph/pull/8157
  • Loading branch information
mrnugget authored Mar 10, 2020
1 parent 4a4341b commit 8e39fbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/src/campaigns_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func getSourcegraphVersion() (string, error) {
}

func sourcegraphVersionCheck(version, constraint, minDate string) (bool, error) {
if version == "dev" {
if version == "dev" || version == "0.0.0+dev" {
return true, nil
}

Expand Down
6 changes: 6 additions & 0 deletions cmd/src/campaigns_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ func TestSourcegraphVersionCheck(t *testing.T) {
minDate: "2020-01-19",
expected: true,
},
{
currentVersion: "0.0.0+dev",
constraint: ">= 3.13",
minDate: "2020-01-19",
expected: true,
},
{
currentVersion: "54959_2020-01-29_9258595",
minDate: "2020-01-19",
Expand Down

0 comments on commit 8e39fbe

Please sign in to comment.