Skip to content

Ruby Gem - Simple Gem to Update Reference Git Tag. Such as, "latest" or "dev"

License

Notifications You must be signed in to change notification settings

bonusbits/update_git_release_tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update Reference Git Tag

Project Release GitHub issues

Simple Script to Update Git Reference Tag. Such as, "latest" or "dev". Basically this can be used for moving a reference version tag such as latest. So we can set a tag such as latest to a specific commit version. Currently it is wrote to set an alternative or reference tag to another tags commit version. So if there is a release tag of 1.0.0, we can create another tag named latest that is the samve version as 1.0.0. Then we can when 1.0.1 is released we can use the script again to move the latest tag to 1.0.1 etc. Of course we can then add this to your CI.

Basically the script removes that reference script and re-creates it at a new commit version.

Usage

ugrt.sh -r [release_tag_name] -n [new_tag_name]
   
Options:
   -r Release Tag Name               :  (Required) i.e. v1.0.0
   -n New Tag Name to add/replace    :  (Optional) i.e. latest, rc, dev, or beta. (Defaults to 'latest')

Symlink

After cloning the repo local you optionally can make a symbolic link to the shell script so it's easily accessible as follows.

 if [ ! -h "/usr/local/bin/ugrt" ]; then
   ln -s "/path/to/clone/update_reference_git_tag/ugrt.sh" /usr/local/bin/ugrt
 fi

Example

  1. Set release latest tag to 1.0.0 release
    • ugrt -r 1.0.0 -n latest
  2. Set release latest tag to 1.1.0 release
    • ugrt -r 1.1.0 -n latest

About

Ruby Gem - Simple Gem to Update Reference Git Tag. Such as, "latest" or "dev"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages