Skip to content

Add build step for stamping Butter with git commit sha version info. #298

Merged
merged 2 commits into from May 25, 2012

3 participants

@humphd
Mozilla member
humphd commented May 16, 2012

No description provided.

@jbuck jbuck commented on an outdated diff May 16, 2012
@@ -75,6 +75,13 @@ target.build = function() {
exec(RJS + ' -o tools/build.js');
exec(RJS + ' -o tools/build.optimized.js');
+ // Stamp Butter.version with the git commit sha we are using
+ var version = exec('git show -s --pretty=format:%h',
+ {silent:true}).output.replace(/\r?\n/m, "");
+ console.log("'" + version + "'");
@jbuck
Mozilla member
jbuck added a note May 16, 2012

I don't think we need this here, do we?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jbuck jbuck commented on an outdated diff May 16, 2012
@@ -75,6 +75,13 @@ target.build = function() {
exec(RJS + ' -o tools/build.js');
exec(RJS + ' -o tools/build.optimized.js');
+ // Stamp Butter.version with the git commit sha we are using
+ var version = exec('git show -s --pretty=format:%h',
@jbuck
Mozilla member
jbuck added a note May 16, 2012

Instead of using git show, you can use git describe which output looks like this: v0.4-81-g24d7d1b

It gives you 3 pieces of information: the tag that the commit is based off, how many commits have been made since that tag, and the commit sha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jbuck
Mozilla member
jbuck commented May 16, 2012

Do you think we should have a VERSION override usable from the command line, or do you think the output of git describe is good enough for our purposes, including a tagged release?

@secretrobotron secretrobotron merged commit 7d0e566 into mozilla:master May 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.