diff --git a/rakefile b/rakefile index 7a50097791..f4f682d41e 100644 --- a/rakefile +++ b/rakefile @@ -10,8 +10,8 @@ DEPLOY_DIR = "/opt/packages" PACKAGE_NAME = "mitx" LINK_PATH = "/opt/wwc/mitx" VERSION = "0.1" -COMMIT = `git rev-parse HEAD`.chomp()[0, 10] -BRANCH = `git symbolic-ref -q HEAD`.chomp().gsub('refs/heads/', '').gsub('origin/', '').gsub('/', '_').downcase() +COMMIT = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()[0, 10] +BRANCH = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp().gsub('refs/heads/', '').gsub('origin/', '').gsub('/', '_').downcase() BUILD_NUMBER = (ENV["BUILD_NUMBER"] || "dev").chomp() if BRANCH == "master"