Skip to content

Instantly share code, notes, and snippets.

@larrymyers
Created September 15, 2011 17:51
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larrymyers/1219952 to your computer and use it in GitHub Desktop.
Save larrymyers/1219952 to your computer and use it in GitHub Desktop.
Create a version.txt file for builds via Jenkins / Hudson and Git
echo "JOB: $JOB_NAME" > version.txt
echo "BUILD NUMBER: $BUILD_NUMBER" >> version.txt
echo "GIT REVISION:" >> version.txt
git log -n 1 >> version.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment