Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

Implement in-place release with -i/--inplace option #2

Merged
merged 5 commits into from
Jul 11, 2012
Merged

Implement in-place release with -i/--inplace option #2

merged 5 commits into from
Jul 11, 2012

Conversation

baby-gnu
Copy link

@baby-gnu baby-gnu commented Jul 5, 2012

This implement a solution to issue #133 "Add ability to release directly
from develop".

When in-place is activated:

  • the current branch must be merged in the develop branch
  • no mergeback occurs
  • no branch deletion occurs

The in-place release can be called in two ways:

git flow release finish -i <version>

or a shorter form:

git flow release -i <version>
  • git-flow-release (cmd_default): Define flags of cmd_list() and
    cmd_finish() to support the shorter call form.
    Call cmd_finish() if inplace is enabled.
    (cmd_list): Avoid warning by redefining the verbose flag if called from
    cmd_default().
    (cmd_finish): Avoid warning by redefining flags if called from
    cmd_default().
    Add filter on the version.
    Do not merge back and delete branch when inplace is enabled

baby-gnu added 5 commits July 5, 2012 13:51
This implement a solution to issue #133 "Add ability to release directly
from develop".

When in-place is activated:

- the current branch must be merged in the develop branch
- no mergeback occurs
- no branch deletion occurs

The in-place release can be called in two ways:

    git flow release finish -i <version>

or a shorter form:

    git flow release -i <version>

* git-flow-release (cmd_default): Define flags of cmd_list() and
  cmd_finish() to support the shorter call form.
  Call cmd_finish() if inplace is enabled.
  (cmd_list): Avoid warning by redefining the verbose flag if called from
  cmd_default().
  (cmd_finish): Avoid warning by redefining flags if called from
  cmd_default().
  Add filter on the version.
  Do not merge back and delete branch when inplace is enabled
* git-flow-release (cmd_finish): Rename $BASE to $BRANCH and add branch
  equal requirement.
* git-flow-release (cmd_finish): Add conditional on remote branch existence.
* git-flow-release (cmd_finish): Remove equality test to remote develop
  branch.
@petervanderdoes
Copy link
Owner

I won't implement the shorter version git flow release -i <version> as this messes up when you run git flow release -h and the flags shown do not apply to git flow release

$ git flow release -h
USAGE: git flow release [flags] args
flags:
  -h,--[no]help:  show this help (default: false)
  -F,--[no]fetch:  fetch from origin before performing finish (default: false)
  -s,--[no]sign:  sign the release tag cryptographically (default: false)
  -u,--signingkey:  use the given GPG-key for the digital signature (implies -s) (default: '')
  -m,--message:  use the given tag message (default: '')
  -p,--[no]push:  push to origin after performing finish (default: false)
  -k,--[no]keep:  keep branch after performing finish (default: false)
  -n,--[no]notag:  don't tag this release (default: false)
  -b,--[no]nobackmerge:  don't back-merge master, or tag if applicable, in develop  (default: false)
  -i,--[no]inplace:  Release directly on the development branch (default: false)
  -v,--[no]verbose:  verbose (more) output (default: false)
USAGE: git flow release [flags] args
flags:
  -h,--[no]help:  show this help (default: false)
  -F,--[no]fetch:  fetch from origin before performing finish (default: false)
  -s,--[no]sign:  sign the release tag cryptographically (default: false)
  -u,--signingkey:  use the given GPG-key for the digital signature (implies -s) (default: '')
  -m,--message:  use the given tag message (default: '')
  -p,--[no]push:  push to origin after performing finish (default: false)
  -k,--[no]keep:  keep branch after performing finish (default: false)
  -n,--[no]notag:  don't tag this release (default: false)
  -b,--[no]nobackmerge:  don't back-merge master, or tag if applicable, in develop  (default: false)
  -i,--[no]inplace:  Release directly on the development branch (default: false)
  -v,--[no]verbose:  verbose (more) output (default: false)

Instead of:

$ git flow release -h
USAGE: git flow release [flags] args
flags:
  -h,--[no]help:  show this help (default: false)
  -v,--[no]verbose:  verbose (more) output (default: false)

@petervanderdoes petervanderdoes merged commit e0fec4b into petervanderdoes:develop Jul 11, 2012
@baby-gnu
Copy link
Author

I'm fine with this, I should have done two commit as I was not sure for the shorter form.

The shorter form would be possible if shFlags permit to ignore unknown flags, say cmd_default() define only -h, -v and -i and tells shFlags to ignore all the others.
But shFlags code is quite difficult to enter into ;-)

petervanderdoes pushed a commit that referenced this pull request Jul 13, 2012
Commit pointed by tags are reachable with <rev>^0[1].

* gitflow-common (git_is_ancestor): Dereference tags.

Footnotes:
[1]  https://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html

fixes: #2
ChrisJStone referenced this pull request in CJ-Systems/gitflow-cjs Jun 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants