Automatically map android app versions to git tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
extras
lib
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
lasertag.gemspec

README.md

Lasertag

Gem Version Build Status

Like most VCSs, Git has the ability to tag specific points in history as being important. Typically people use this functionality to mark release points (v1.0.0, and so on)

Usage

This will extract the android's app module version and create a matching git tag.

$ lasertag --module [module_name]

A bit more complex usage:

$ lasertag --path ~/Project --module app --flavor prod --remote origin

Handy in

Pretty handy in situations like the most used git workflow, the Gitflow Workflow, a strict branching model designed around the project release:

Full usage

Usage: lasertag [OPTIONS]

Options
  -m, --module MODULE    # Specifies the app module
  -f, --flavor FLAVOR    # Specifies the flavor (e.g. dev, qa, prod)
  -p, --path PATH        # Custom path to android project
  -d, --dont-push        # Only tags the code, doesn't push it upstream
  -r, --remote REMOTE    # Custom remote to your project (default: "origin")
  -h, --help             # Displays help
  -v, --version          # Displays version

Installation

$ gem install lasertag

Ubuntu

This tool requires a working Gradle distribution and currently does not make use of the Gradle wrapper bundled with the Android project. To install Gradle,

apt-get install gradle

This applies for other linux distros as well.

Under the hood

  • Tries to compile the project
  • Find out the package and the app version
  • executes git tag -a v[tag_version] -m "tag [tag_name]"
  • executes git push origin [tag_name]

Whenever a step fails, it stops the whole process and rolls it back.

License

The gem is available as open source under the terms of the MIT License.