Skip to content
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

changelog (and potentially other commands) can't handle working from branches #130

Open
helgi opened this issue Aug 20, 2016 · 10 comments
Open
Labels

Comments

@helgi
Copy link

helgi commented Aug 20, 2016

I had to release v2.4.1 and base if of v2.4.0 instead of master / workflow-dev. When I went to the changelog individual phase then that command got rather confused.

The way I created my branch in Controller was to create a stable-v2.4.1 (name doesn't really matter much) from the v2.4.0 tag, cherry-pick changes from master that I wanted released (note that in other cases special commits may have to be done since cherry-pick may not always work).

I did not push the branch up. When I ran changelog individual then it tried to pull info from master... I tried --base-tag and --sha but it wasn't very clear what was what.

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

@helgi helgi added the bug label Aug 20, 2016
@vdice
Copy link
Member

vdice commented Aug 23, 2016

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

@helgi I think indeed this is the issue. @Joshua-Anderson thoughts?

@Joshua-Anderson
Copy link

Yes, you needed to push your branch before using deisrel to generate a changelog.

@Joshua-Anderson
Copy link

@helgi is this behavior ok or would you like to see something different?

@helgi
Copy link
Author

helgi commented Aug 23, 2016

Not really sure why I'd have to push - So we can use GH HTTP APIs instead of dropping down to git mechanics?

@Joshua-Anderson
Copy link

We use the GH api to get the commit diff between the old tag and the SHA of the new tag. If the new sha doesn't exist, it can't calculate the range.

We could use raw git, but it's less deterministic (different checkouts, haven't pulled) and parsing the output from the git CLI is much more difficult than using the GH Go SDK.

@helgi
Copy link
Author

helgi commented Aug 23, 2016

The tool will still have to verify the branch has been pushed and all that, which would involve git operations, no?

@Joshua-Anderson
Copy link

I'd see this workflow for a patch release:

  1. Person creates new branch from old tag, cherrypicks changes and pushes to GH for verification and testing by other people.
  2. Person uses deisrel to generate diff between the old tag and the new SHA.
  3. Person creates new tag with created changelog.

@helgi
Copy link
Author

helgi commented Aug 23, 2016

Alright but that doesn't really answer my question - The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

@Joshua-Anderson
Copy link

The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

I'd personally feel this is more of a documentation problem than a deisrel problem. Is there much that can be done in deisrel to check for this? I guess we could clean up the message to say "could not find SHA, has it been pushed to github"?

@Cryptophobia
Copy link

This issue was moved to teamhephy/deisrel#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants