github-release icon indicating copy to clipboard operation
github-release copied to clipboard

Fairly major changes; add --update

Open parsley42 opened this issue 6 years ago • 7 comments

I just want to lead out and say I'm not expecting this to be merged (certainly not as-is), but I wanted to give buildkite a look at my changes, and offer to create a cleaner PR if the changes are desired.

My goal was a github-release tool that allowed smooth updates to snapshot pre-releases. As I push changes to feature branches, it's helpful to have automatic build and publish to a pre-release on github, but none of the existing github release publishing tools appeared to offer that ability. Of the tools I examined, your github-release seemed most amenable to modification.

While my patched version suits my needs, it puts more requirements on potential users, as the commit hash is now required. The big upshot for me is that when e.g. a new 1.0.1-snapshot build completes, github correctly reports the snapshot release was "5 minutes ago", and not "10 days ago" (when the first 1.0.1-snapshot was built).

parsley42 avatar Mar 15 '18 12:03 parsley42

Apologies @parsley42, somehow I wasn't watching this repo and this completely slipped my attention!

Interesting idea 🤔Would we need both target and commit? Might we just go with a single commitish?

lox avatar Apr 23 '18 01:04 lox

Hah! Thanks for getting back with me @lox - I was a little surprised to get a reply on this PR. ;-)

Yah, I think I could rename target to target-branch, then use that with GetBranch to look up the commit and pass that to CreateRef. That would also simplify my calling script. I'll try to find time for that this week.

parsley42 avatar Apr 23 '18 14:04 parsley42

(adding) ... It looks like the only place I can use a commitish is in a RepositoryRelease object, but I need a SHA for creating the updated ref, and it seems like the best way to look up the correct SHA is to assume target is a branch and use GetBranch. Make sense?

parsley42 avatar Apr 23 '18 14:04 parsley42

@parsley42 this is a long shot but you're active on github, how do you build this project? I can't find anything in the readme

5HT2 avatar Apr 27 '20 22:04 5HT2

@dominikaaaa happy to help if you need!

lox avatar Apr 28 '20 05:04 lox

@parsley42 this is a long shot but you're active on github, how do you build this project? I can't find anything in the readme

@dominikaaaa Fairly straightforward (well, for regular Go programmers at least):

  • Install recent Go for your platform (https://golang.org/dl)
  • In the top-level dir: $ go build -o github-release
  • $ ./github-release --help

Or, if you added $HOME/go/bin to your PATH:

  • go get github.com/buildkite/github-release
  • github-release --help

Hope that helps.

parsley42 avatar Apr 28 '20 12:04 parsley42

@parsley42 thank you! I've never used go before but I wanted to build the pulls to try them myself. Appreciate it!

5HT2 avatar Apr 28 '20 15:04 5HT2