lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.9.1 vs lib/salesforcedeploytool/app.rb in salesforce-deploy-tool-0.9.2
- old
+ new
@@ -25,11 +25,11 @@
@username = @sandbox == 'prod' ? config[:username] : config[:username] + '.' + @sandbox
@server_url = @sandbox == 'prod' ? 'https://login.salesforce.com' : 'https://test.salesforce.com'
end
- def commit_hash
+ def set_version
g = Git.open(@git_dir)
File.open(@version_file,'r+') do |file|
content = file.read
@@ -102,24 +102,19 @@
exec_options[:failmsg] = nil
end
exit_code = myexec full_cmd, exec_options
- clean_version
-
exit exit_code if exit_code != 0
end
def push
# Working dir
Dir.chdir @git_dir
- # Add the commit hash to the version file
- commit_hash
-
# Set env variables to run ant
env_vars = ""
env_vars += " SF_USERNAME=" + @username
env_vars += " SF_PASSWORD=" + @password
env_vars += " SF_SERVERURL=" + @server_url
@@ -150,12 +145,9 @@
FileUtils.rm file if File.exists? file
end
# Push the code
exit_code = myexec full_cmd, exec_options
-
- # Clean changes on version file
- clean_version
# exit with exit_code
exit exit_code if exit_code != 0
end