test(builds): add test build options to github-release tool

This will allow me to run test builds against experimental branches of
the build-emacs-for-macos build script, and publish them under a
pre-release "Test Builds" GitHub Release, rather than a normal nightly
release.
This commit is contained in:
2021-05-16 16:15:14 +01:00
parent 31a12fc502
commit 8544a650ab
4 changed files with 86 additions and 27 deletions

View File

@@ -27,15 +27,15 @@ func checkAction(c *cli.Context, opts *globalOptions) error {
fmt.Printf(
"==> Checking github.com/%s for release: %s\n",
repo.String(), plan.Release,
repo.String(), plan.Release.Name,
)
release, resp, err := gh.Repositories.GetReleaseByTag(
c.Context, repo.Owner, repo.Name, plan.Release,
c.Context, repo.Owner, repo.Name, plan.Release.Name,
)
if err != nil {
if resp.StatusCode == http.StatusNotFound {
return fmt.Errorf("release %s does not exist", plan.Release)
return fmt.Errorf("release %s does not exist", plan.Release.Name)
} else {
return err
}