Skip to content

Commit

Permalink
Append git commit SHA to the version number
Browse files Browse the repository at this point in the history
  • Loading branch information
samleb committed Dec 8, 2013
1 parent 4d6bc08 commit c14138d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def self.preprocess(input)
def initialize(input)
super(input, nil, nil, "@buffer")
end

def append_git_hash
self << `git rev-parse HEAD`.chop!
end

def <<(string)
@buffer << string
Expand All @@ -96,7 +100,7 @@ def result
end
end

if __FILE__ == $0
if __FILE__ == $PROGRAM_NAME
print Bouncer::Preprocessor.new(DATA.read).result
end

Expand Down
2 changes: 1 addition & 1 deletion src/bouncer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Bouncer v0.2.0-alpha, Copyright (c) 2008-2012 Samuel Lebeau */
/*! Bouncer v0.2.0-alpha+<% append_git_hash %>, Copyright (c) 2008-2012 Samuel Lebeau */
(function(GLOBAL, document, undefined) {
"use strict";

Expand Down

0 comments on commit c14138d

Please sign in to comment.