bin/sf in salesforce-deploy-tool-0.9.1 vs bin/sf in salesforce-deploy-tool-0.9.2
- old
+ new
@@ -152,11 +152,16 @@
# even when it is a destructive change. This is because if a class is referencing
# a field to be deleted, then we first need to push the class to remove that
# reference and only then SF will allow us to remove the field on the second
# push
sfdt.build_number = options.build_number if not options.build_number.nil?
- sfdt.push
+ sfdt.set_version
+ begin
+ sfdt.push
+ ensure
+ sfdt.clean_version
+ end
if ! options.append
# Pull changes from sandbox to temporary directory:
config_tmp = config.clone
config_tmp[:git_dir] = config_tmp[:tmp_dir]
@@ -180,10 +185,14 @@
$stdout = stringio unless options.debug
dc_gen.generate_destructive_changes
$stdout = stdout_tmp
# Destructive push
- sfdt.push
+ begin
+ sfdt.push
+ ensure
+ sfdt.clean_version
+ end
end
end
end
command :sandbox do |c|