Browse files

Append git commit SHA to the version number

  • Loading branch information...
1 parent 4d6bc08 commit c14138d66e28a7887f2355bc95e0bfa7f755fa63 @samleb committed Dec 8, 2013
Showing with 6 additions and 2 deletions.
  1. +5 −1 preprocessor.rb
  2. +1 −1 src/bouncer.js
View
6 preprocessor.rb
@@ -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
@@ -96,7 +100,7 @@ def result
end
end
-if __FILE__ == $0
+if __FILE__ == $PROGRAM_NAME
print Bouncer::Preprocessor.new(DATA.read).result
end
View
2 src/bouncer.js
@@ -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";

0 comments on commit c14138d

Please sign in to comment.