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

Workflow with git-flow #275

Open
Jeehut opened this issue Jul 12, 2015 · 5 comments
Open

Workflow with git-flow #275

Jeehut opened this issue Jul 12, 2015 · 5 comments

Comments

@Jeehut
Copy link

Jeehut commented Jul 12, 2015

I just tried to find the right workflow using Jeweler in combination with git-flow for my db_clustering project. In git-flow I'm used to start a release branch (e.g. release/1.1.2), do my release there so run rake version:bump:patch and rake release and merge the release branch with the git-flow scripts (which will merge it to master and develop and checkout the develop branch).

The problem is that rake release automatically creates a .gemspec file and uses the master branch (instead of the current branch) to do the release – which is not what I was expecting since I was in a different branch. This leads to the re-release of the old master branch code under the new version tag. Also simply doing the gem version:bump:patch in the release branch and running rake release after merging it to the master branch didn't seem right since this will prevent the .gemspec file from being updated within the develop branch and I have to manually prevent the merging to the master branch in git-flow from creating a 1.1.2 flag.

For now I have stopped using git-flow within that library until I'm sure how to do it the right way. Are there any thoughts on how to use git-flow alongside jeweler?

Thanks in advance for any help.

@technicalpickles
Copy link
Owner

Did a quick code search for master, and found

args[:branch] = ENV['BRANCH']

So, you might be able to specify BRANCH=whatever rake release to use a different branch.

@Jeehut
Copy link
Author

Jeehut commented Jul 18, 2015

Thank you @technicalpickles so far. If I understand correctly to start the release branch `release/1.1.2' I need to run the following in order to release the gem:

BRANCH=release/1.1.2 rake release

This way I can't run the same command on each release but have to use the current git release branchs name. Now I have two questions remaining to make this work really well with jeweler:

  1. How can I tell jeweler to use the current branch to prevent changing the command on each release
  2. How can I prevent jeweler from automatically tagging the specified branch (git-flow does this itself on the master branch when merging the release branch)

@flajann2
Copy link
Collaborator

If this is still a needed feature, please let me know, else I will be closing this issue soon.

@Jeehut
Copy link
Author

Jeehut commented Oct 22, 2016

Well, I moved away from jeweler a long time ago because of this issue. Therefore I don't need it anymore personally.

@flajann2
Copy link
Collaborator

flajann2 commented Nov 3, 2016

I imagine others will need this feature, so I'll keep it on the list anyway.

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

No branches or pull requests

3 participants