release: FEATURE.md
This commit is contained in:
64
FEATURE.md
64
FEATURE.md
@@ -4,17 +4,17 @@
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
This utility is built around some standard branch names: `master`, `develop`, and `integration`.
|
This utility is built around the standard branch `master` and branches for releases that follow the format of MAJOR.MINOR.PATCH.
|
||||||
|
|
||||||
Feature branches have specific format: USER-BASE-FEATURE.
|
Feature branches have specific format: USER-BASE-FEATURE.
|
||||||
|
|
||||||
* USER is the username as specificied by the USER environment variable
|
* USER is the username as specified by the USER environment variable
|
||||||
* BASE is the standard branch to base the feature branch on
|
* BASE is the standard branch or release branch to base the feature branch on
|
||||||
* FEATURE is the name of the feature
|
* FEATURE is the name of the feature
|
||||||
|
|
||||||
#### Start
|
#### Start
|
||||||
|
|
||||||
To start a new feature, go to one of the standard branches.
|
To start a new feature, go to the standard branch or a release branch.
|
||||||
|
|
||||||
```
|
```
|
||||||
git checkout master
|
git checkout master
|
||||||
@@ -28,32 +28,6 @@ feature start my new feature
|
|||||||
|
|
||||||
For example, a new branch will be created called `rkiel-master-my-new-feature`
|
For example, a new branch will be created called `rkiel-master-my-new-feature`
|
||||||
|
|
||||||
#### Rebase
|
|
||||||
|
|
||||||
Use the `rebase` subcommand to pull down any changes from the standard branch and then rebase with your feature branch changes.
|
|
||||||
In addition, a backup copy of your feature changes will be pushed out to `origin`.
|
|
||||||
This backup should not be used to collaborate with others. It is just a personal backup and will be deleted and recreated with each `rebase`.
|
|
||||||
|
|
||||||
```
|
|
||||||
feature rebase
|
|
||||||
```
|
|
||||||
|
|
||||||
For example, `rkiel-master-my-new-feature` will be pushed out to `origin`.
|
|
||||||
|
|
||||||
#### Merge
|
|
||||||
|
|
||||||
Use the `merge` subcommand to merge your feature branch changes to the standard branch.
|
|
||||||
|
|
||||||
```
|
|
||||||
feature merge
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also override the default standard branch by specifying another branch.
|
|
||||||
|
|
||||||
```
|
|
||||||
feature merge integration
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Commit
|
#### Commit
|
||||||
|
|
||||||
Use the `commit` subcommand to make it easier to write commit messages.
|
Use the `commit` subcommand to make it easier to write commit messages.
|
||||||
@@ -85,6 +59,32 @@ feature commit -m this is a sample commit message -f
|
|||||||
generates the command `git commit -m "this is a sample commit message (no-verify)" --no-verify`.
|
generates the command `git commit -m "this is a sample commit message (no-verify)" --no-verify`.
|
||||||
|
|
||||||
|
|
||||||
|
#### Rebase
|
||||||
|
|
||||||
|
Use the `rebase` subcommand to pull down any changes from the standard branch and then rebase with your feature branch changes.
|
||||||
|
In addition, a backup copy of your feature changes will be pushed out to `origin`.
|
||||||
|
This backup should not be used to collaborate with others. It is just a personal backup and will be deleted and recreated with each `rebase`.
|
||||||
|
|
||||||
|
```
|
||||||
|
feature rebase
|
||||||
|
```
|
||||||
|
|
||||||
|
For example, `rkiel-master-my-new-feature` will be pushed out to `origin`.
|
||||||
|
|
||||||
|
#### Merge
|
||||||
|
|
||||||
|
Use the `merge` subcommand to merge your feature branch changes to the standard branch.
|
||||||
|
|
||||||
|
```
|
||||||
|
feature merge
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also override the default standard branch by specifying another branch.
|
||||||
|
|
||||||
|
```
|
||||||
|
feature merge integration
|
||||||
|
```
|
||||||
|
|
||||||
#### End
|
#### End
|
||||||
|
|
||||||
Use the `end` subcommand to safely close out the feature.
|
Use the `end` subcommand to safely close out the feature.
|
||||||
@@ -108,7 +108,3 @@ a confirmation.
|
|||||||
```
|
```
|
||||||
feature trash local-branch-confirmation
|
feature trash local-branch-confirmation
|
||||||
```
|
```
|
||||||
|
|
||||||
## Xgrep utility
|
|
||||||
|
|
||||||
This utility makes it easier to use git-grep.
|
|
||||||
|
|||||||
@@ -39,4 +39,14 @@ function get_feature_commands()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_release_commands()
|
||||||
|
{
|
||||||
|
if [ -z $2 ] ; then
|
||||||
|
COMPREPLY=(`release tab`)
|
||||||
|
else
|
||||||
|
COMPREPLY=(`release tab $2`)
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
complete -F get_feature_commands feature
|
complete -F get_feature_commands feature
|
||||||
|
complete -F get_release_commands release
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ module Release
|
|||||||
:major,
|
:major,
|
||||||
:minor,
|
:minor,
|
||||||
:patch,
|
:patch,
|
||||||
|
:tab,
|
||||||
:trash
|
:trash
|
||||||
].sort
|
].sort
|
||||||
|
|
||||||
|
|||||||
32
lib/release/tab.rb
Normal file
32
lib/release/tab.rb
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
require_relative './base'
|
||||||
|
require_relative './commander'
|
||||||
|
require_relative './loader'
|
||||||
|
|
||||||
|
module Release
|
||||||
|
|
||||||
|
class Tab < Release::Base
|
||||||
|
|
||||||
|
COMMANDS = Release::Commander::COMMANDS
|
||||||
|
DEFAULT = Release::Commander::DEFAULT
|
||||||
|
|
||||||
|
def valid?
|
||||||
|
[1,2].include? argv.size
|
||||||
|
end
|
||||||
|
|
||||||
|
def help
|
||||||
|
"release tab [pattern]"
|
||||||
|
end
|
||||||
|
|
||||||
|
def execute
|
||||||
|
if argv.size == 1
|
||||||
|
pattern = '.+'
|
||||||
|
elsif argv.size == 2
|
||||||
|
pattern = "^#{argv[1]}"
|
||||||
|
end
|
||||||
|
|
||||||
|
loader = Release::Loader.new(COMMANDS,DEFAULT)
|
||||||
|
puts loader.search(pattern).join("\n")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user