Skip to content

UniversityOfIowaHealthCare/hc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HC

Ongoing command line tool to make version control less painful and inconsistent.

Installation

HC is an npm package. Be sure you have npm installed and then run this in your terminal:

$ npm i -g @uihc/hc

Usage

Overview

Angle brackets (<>) mean an argument is required, square brackets ([]) mean it's optional. Options are always optional.

Command Arguments Options (w/aliases) Description Basic Example
tag [release-number], [message] --release-number -n --message -m Create a formatted git tag. hc tag
tag push --remote -r Push the most recently created git tag. hc tag push

Commands

tag

Create formatted git tags. Default tag format is date.release-number.message

Usage:
$ hc tag[release-number-today] "[message]"

Basic Example:
$ hc tag 1 "Initial release"

Created git tag: 
2018-11-06.1.initial_release

$

Options:
  • --release-number -n: Specify what release number this is today.
  • --message -m: Give the tag a name and a message. HC creates annotated git tags with the same name and message. Note: Be sure to wrap the message in quotes if you specify it either as an option or an argument.

Details:
tag is a very flexible command. You can choose to omit or include any option or argument you'd like. If either message or release number are missing, HC can infer them. How? When the --release-number option is omitted, HC simply finds the latest release for the current day and increments it. If there is no release yet today, HC will start with 0. When you omit the --message option, HC will grab the last commit message and use it as the tag's name and message.

More detailed examples:
  • With options hc tag -n 3 -m "Any option combination will do"
  • With arguments hc tag 2 "This is more concise but less flexible than using options"
  • Or on its own hc tag