1.1.2 • Published 3 years ago

hypa-git v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Hypa-Git is a zsh script to help us with the robotic task of create RC's and merge all branches at the sprint ending.

Briefly what hypa-git does is create a new RC branch from last tag and name it based on provided semantic version option.

Note²: I'm not a zsh expert. Perhaps some code on this script can be done better or are wrong. I would be happy if you open an issue to talk about it 🤝

Requirements

You must have zsh installed in order to use hypa-git.

Installing

npm

npm install -g hypa-git

Easy peasy. This command should copy hypa-git to $HOME/.hypa-git and link it on your /usr/local/bin folder to make it executable.

Manual

1) Clone this repository: git clone https://github.com/luizeboli/hypa-git;

2) Copy hypa-git folder to $HOME/.hypa-git: cp -R /path/where/you/cloned/hypa-git $HOME/.hypa-git;

3) Create a symbolic link on your /usr/local/binfolder: ln -s path/where/you/cloned/hypa-git/index.zsh /usr/local/bin/hypa-git;

Usage

You can exec hypa-git from your terminal for a usage guide or look at below options.

Options

At least one option is required

NameDescription
-nv, --new-versionNew RC name
-b, --branchesBranches to merge on new RCThey must be in double quotesSpace delimited
-majorMajor version increment on new RC
-minorMinor version increment on new RC
-patchPatch version increment on new RC

Some notes about how hypa-git handle these options

  • If no new version option is provided, hypa-git will increment version based on semver option
  • If no semver option is provided, hypa-git will consider the new RC as a patch.
  • If no branch option is provided, hypa-git will only create and push the new RC.
  • If RC already exists, hypa-git will skip creation step.

Usage Examples

Let's use a git repository with newest tag named 1.13.1 as an example:

# This block will create a new branch named '1.13.2-RC'
# And merge 'branch-one' and 'branch-two' 
hypa-git -b "branch-one branch-two"

# This block will create a new branch named '1.14.0-RC' 
# And merge 'branch-one'
# In case there's a conflict, hypa-git you warn you and open vscode (if installed)
hypa-git -b "branch-one" -minor

# This block will create a new branch named '2.0.0-RC'
hypa-git -nv 2.0.0-RC

# This block will create a new branch named '1.13.2-RC'
hypa-git -patch 

Contributors

Thanks for the idea!Renan Marangon
Renan Marangon
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.1.7-alpha

4 years ago

0.1.6-alpha

4 years ago

0.1.5-alpha

4 years ago

0.1.3-alpha

4 years ago

0.1.2-alpha

4 years ago

0.1.0-alpha

4 years ago

0.1.0

4 years ago