8000 GetRelease from GitHub store now tries to find a release with a tag matching the version with 'v' prefixed or the version directly by gulien · Pull Request #10 · tj/go-update · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

GetRelease from GitHub store now tries to find a release with a tag matching the version with 'v' prefixed or the version directly #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gulien
Copy link
@gulien gulien commented Jun 27, 2018

Hello @tj

Thank you for this package, it has been quite useful :)

Only issue for me is the GetRelease function from the GitHub store which prefixes the given version with "v".

As I don't prefix my GitHub release, I had to implement my own GitHub store, which only replaces gh.Repositories.GetReleaseByTag(ctx, s.Owner, s.Repo, "v"+version) with gh.Repositories.GetReleaseByTag(ctx, s.Owner, s.Repo, version).

My PR implements a dumb solution for addressing this issue:

  • first tries to fetch a release with a tag = "v" + version
  • if not release found, tries to fetch a release with a tag = version

…atching the version with 'v' prefixed or the version directly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0