Project

git-dirty

0.0
No release in over 3 years
Low commit activity in last 3 years
This gem provides a Rake task that records the git status in a separate file, which can then be included, e.g. as part of a file-based build process.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.17
~> 10.0
~> 3.0
 Project Readme

Git::DirtyFile

Rake task to record the git status in a separate file

Usage

Add it to your Gemfile:

gem "git-dirty"

In your Rakefile:

require 'git-dirty'
git_dirty_file 'tmp/git-status'

Now you will have a new rake target for tmp/git-status�, which will be updated whenever the contents of that file differ from the actual status.

The status is represented by the output of git rev-parse --short HEAD (which provides the SHA of the current git HEAD). If the workspace is dirty (i.e. has new, changed or deleted files), an asterisk (�*) is appended.

License

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