Use new repo name for update notifier and changelog
This commit is contained in:
parent
25dc2b4a14
commit
1c74227ed7
3 changed files with 5 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ builds:
|
|||
- -s -w -X github.com/cli/cli/command.Version={{.Version}} -X github.com/cli/cli/command.BuildDate={{time "2006-01-02"}}
|
||||
- -X github.com/cli/cli/context.oauthClientID={{.Env.GH_OAUTH_CLIENT_ID}}
|
||||
- -X github.com/cli/cli/context.oauthClientSecret={{.Env.GH_OAUTH_CLIENT_SECRET}}
|
||||
- -X main.updaterEnabled=github/homebrew-gh
|
||||
- -X main.updaterEnabled=cli/cli
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ func colorableErr(cmd *cobra.Command) io.Writer {
|
|||
}
|
||||
|
||||
func changelogURL(version string) string {
|
||||
path := "https://github.com/github/homebrew-gh"
|
||||
path := "https://github.com/cli/cli"
|
||||
r := regexp.MustCompile(`^v\d+\.\d+.\d+$`)
|
||||
if !r.MatchString(version) {
|
||||
return fmt.Sprintf("%s/releases/latest", path)
|
||||
|
|
|
|||
|
|
@ -7,21 +7,21 @@ import (
|
|||
|
||||
func TestChangelogURL(t *testing.T) {
|
||||
tag := "v0.3.2"
|
||||
url := fmt.Sprintf("https://github.com/github/homebrew-gh/releases/tag/v0.3.2")
|
||||
url := fmt.Sprintf("https://github.com/cli/cli/releases/tag/v0.3.2")
|
||||
result := changelogURL(tag)
|
||||
if result != url {
|
||||
t.Errorf("expected %s to create url %s but got %s", tag, url, result)
|
||||
}
|
||||
|
||||
tag = "0.3.5-90-gdd3f0e0"
|
||||
url = fmt.Sprintf("https://github.com/github/homebrew-gh/releases/latest")
|
||||
url = fmt.Sprintf("https://github.com/cli/cli/releases/latest")
|
||||
result = changelogURL(tag)
|
||||
if result != url {
|
||||
t.Errorf("expected %s to create url %s but got %s", tag, url, result)
|
||||
}
|
||||
|
||||
tag = "deadbeef"
|
||||
url = fmt.Sprintf("https://github.com/github/homebrew-gh/releases/latest")
|
||||
url = fmt.Sprintf("https://github.com/cli/cli/releases/latest")
|
||||
result = changelogURL(tag)
|
||||
if result != url {
|
||||
t.Errorf("expected %s to create url %s but got %s", tag, url, result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue