Skip to content

Commit

Permalink
Add version scoped url
Browse files Browse the repository at this point in the history
golang/go#35732

It looks like our install instructions fall into this [pseudo-version](https://golang.org/cmd/go/#hdr-Pseudo_versions)
trap mentioned in the above issue. This adds the `v3` scope to the url
and it updated the bump script to make sure that the number stays up to
date.
  • Loading branch information
bhelx committed May 20, 2020
1 parent e30417f commit 92afb65
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ serialize =

[bumpversion:file:version.go]

[bumpversion:file:README.md]
parse = (?P<major>\d+)
serialize = {major}
search = github.com/recurly/recurly-client-go/v{current_version}
replace = github.com/recurly/recurly-client-go/v{new_version}

[bumpversion:file:go.mod]
parse = (?P<major>\d+)
serialize = {major}
search = github.com/recurly/recurly-client-go/v{current_version}
replace = github.com/recurly/recurly-client-go/v{new_version}

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Documentation for the HTTP API and example code can be found [on our Developer H
Install using `go get`:

```
go get -u github.com/recurly/recurly-client-go
go get -u github.com/recurly/recurly-client-go/v3
```

import with:

```go
import (
"github.com/recurly/recurly-client-go"
"github.com/recurly/recurly-client-go/v3"
)
```

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/recurly/recurly-client-go
module github.com/recurly/recurly-client-go/v3

go 1.12
4 changes: 2 additions & 2 deletions scripts/bump
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if [ "$1" == "--next-version" ]; then
elif [ "$1" == "--this-version" ]; then
grep current_version .bumpversion.cfg | awk -F" = " '{print $2}'
else
bump2version "$@"
fi
bump2version --allow-dirty "$@"
fi

0 comments on commit 92afb65

Please sign in to comment.