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

git-flow CLI #10

Closed
wants to merge 1 commit into from
Closed

git-flow CLI #10

wants to merge 1 commit into from

Conversation

MadLittleMods
Copy link

@MadLittleMods MadLittleMods commented Oct 27, 2016

Fixes #9

git-flow CLI.

Still WIP but would love some discussion/suggestions on the direction this should go. If we want to suss this out through chat, I am available on Gitter but would be great to create a nodegit-flow specific room to keep the discussion out in the open. This could end up as a separate package if we don't want the CLI added here.

The reason for this over some of the other CLI options out there is so that there is an option on Windows that doesn't require cygwin. Plus JavaScript based 👍

git-flow init

git-flow feature start foo
git-flow feature finish foo

git-flow release start 0.1.0
git-flow release finish 0.1.0

git-flow hotfix start 0.1.1
git-flow hotfix finish 0.1.1

http://danielkummer.github.io/git-flow-cheatsheet/

Todo

  • Better logging
    • Should we use console.log?
  • Figure out why finish mergeCommit.id() doesn't work as documented 😕
  • publish
  • push (maybe)

@smith-kyle
Copy link
Contributor

smith-kyle commented Nov 2, 2016

This is great! Personally, I don't mind adding the cli to this project (as long as it never causes the API to change) but I can think of a couple reasons why you might want to make it a separate thing.

With your own repo/package, you'd be able to give the project a more concise description and name so potential users would have an easier time finding your project. Secondly, most users of nodegit-flow are going to be using it either through the cli or JS, not both. That means sifting through docs will be a bit tougher since you'd have to first find the section that refers to the API you're using.

Overall I think it'd be less confusing to users if we kept the two separate. But like I said I'm open to the idea. Let me know if there are any advantages I'm not seeing.

@@ -0,0 +1,148 @@
#!/usr/bin/env devtool
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to #!/usr/bin/env node

else if(type === 'release') {
return Git.Flow.startRelease(repo, name);
}
else if(type === 'hofix') {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo hotfix

@thatkookooguy
Copy link

@MadLittleMods don't know if this helps, but I started working on something similar myself: https://github.com/Kibibit/kibibit-cli

It's currently not stable (I'm in the middle of writing it :-)), and it's also coupled with github (by a single file called kb-github, which you can implement whatever cloud version control you want if you replace that file)

It's not vanilla nodegit-flow (I do some extra stuff, like creating a repo on init if you're not already inside a git repo), but might suite your needs

@MadLittleMods
Copy link
Author

Closing as it looks like this was built into git (Git for Windows) since 2015-12-8 https://github.com/git-for-windows/git/releases/tag/v2.6.4

As of Git for Windows 2.6.4, GitFlow (AVH edition) is included, so you're all done.

https://github.com/petervanderdoes/gitflow-avh/wiki/Installing-on-Windows#git-for-windows

Works for me 👍

$ git --version
git version 2.7.1.windows.1
$ git flow -h
usage: git flow <subcommand>

Available subcommands are:
   init      Initialize a new git repo with support for the branching model.
   feature   Manage your feature branches.
   bugfix    Manage your bugfix branches.
   release   Manage your release branches.
   hotfix    Manage your hotfix branches.
   support   Manage your support branches.
   version   Shows version information.
   config    Manage your git-flow configuration.
   log       Show log deviating from base branch.

Try 'git flow <subcommand> help' for details.

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.

Add bin executable
3 participants