Project

lasertag

0.01
No commit activity in last 3 years
No release in over 3 years
Automatically map android app version to git tags
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
>= 0

Runtime

~> 1.7
~> 0.7
~> 1.2
~> 1.3.1
 Project Readme

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.