bin/sf in salesforce-deploy-tool-0.7.3 vs bin/sf in salesforce-deploy-tool-0.8.0
- old
+ new
@@ -38,12 +38,14 @@
c.description = "Clone the #{config[:git_repo]} to #{config[:git_dir]}"
c.example 'usage', 'sf init'
c.option "--sandbox NAME", "-s NAME", "use 'prod' to deploy production or sandbox name"
c.action do |args, options|
- # Parameter validation:
+ # short flag mapping
options.sandbox = options.s if options.s
+
+ # Parameter validation:
if options.sandbox.nil? and sandbox.nil?
puts "error: please specify sandbox using --sandbox or sf sandbox"
exit 1
end
config[:sandbox] = options.sandbox || sandbox
@@ -65,13 +67,16 @@
c.option "--append", "Pull code appending it to the local repository"
c.option "--debug", "Verbose output"
c.option "--sandbox NAME", "-s NAME", "use 'prod' to deploy production or sandbox name"
c.action do |args, options|
+ # short flag mapping
+ options.sandbox = options.s if options.s
+
# Parameter validation:
if options.sandbox.nil? and sandbox.nil?
- puts "error: please specify the sandbox to pull from using --sandbox"
+ puts "error: please specify sandbox using --sandbox or sf sandbox"
exit 1
end
config[:sandbox] = options.sandbox || sandbox
config[:debug] = options.debug.nil? ? false : true
@@ -96,13 +101,14 @@
c.option "--sandbox NAME", "-s NAME", "use 'prod' to deploy production or sandbox name"
c.option "--debug", "Verbose output"
c.option "--test", "-T", "Deploy and test"
c.option "--exclude LIST", "-x LIST", "a CSV list of metadata to exclude when creating destructiveChange.xml"
c.option "--append", "Disable destructive change and do an append deploy"
+ c.option "--build_number NUMBER","Record build number on version file"
c.action do |args, options|
- # short flag for test, so that not conflicts with trace
+ # short flag mapping
options.test = true if options.T
options.exclude = options.x if options.x
options.sandbox = options.s if options.s
# Parameter validation:
@@ -142,9 +148,10 @@
dc_gen.generate_destructive_changes
$stdout = stdout_tmp
end
# Finally push:
+ sfdt.build_number = options.build_number if not options.build_number.nil?
sfdt.push
end
end