mirror of
https://github.com/ViViDboarder/abuse-the-force.git
synced 2024-11-24 05:36:35 +00:00
Improve temp target switching for project actions
This commit is contained in:
parent
8030fe5f57
commit
df81c1dde8
@ -236,17 +236,17 @@ module AbuseTheForce
|
||||
|
||||
# If a new target was provided, switch to it
|
||||
if options[:target] != nil
|
||||
AbuseTheForce.temp_switch_target(options[:target])
|
||||
target = options[:target]
|
||||
end
|
||||
if target != nil
|
||||
AbuseTheForce.temp_switch_target(target)
|
||||
AbuseTheForce.temp_switch_target target
|
||||
end
|
||||
|
||||
# Deploy the project
|
||||
AbuseTheForce.deploy_project()
|
||||
|
||||
# if using a temp target, switch back
|
||||
if options[:target] != nil
|
||||
if target != nil
|
||||
AbuseTheForce.temp_switch_target
|
||||
end
|
||||
end
|
||||
@ -279,7 +279,7 @@ module AbuseTheForce
|
||||
|
||||
# If a new target was provided, switch to it
|
||||
if options[:target] != nil
|
||||
AbuseTheForce.temp_switch_target(options[:target])
|
||||
AbuseTheForce.temp_switch_target options[:target]
|
||||
end
|
||||
|
||||
# No metadata passed in, this should be a file path
|
||||
@ -318,18 +318,21 @@ module AbuseTheForce
|
||||
end
|
||||
|
||||
desc "project", "Retrieve a whole project"
|
||||
def project()
|
||||
def project(target=nil)
|
||||
|
||||
# If a new target was provided, switch to it
|
||||
if options[:target] != nil
|
||||
AbuseTheForce.temp_switch_target options[:target]
|
||||
target = options[:target]
|
||||
end
|
||||
if target != nil
|
||||
AbuseTheForce.temp_switch_target target
|
||||
end
|
||||
|
||||
# Retrieve the project
|
||||
AbuseTheForce.retrieve_project
|
||||
|
||||
# if using a temp target, switch back
|
||||
if options[:target] != nil
|
||||
if target != nil
|
||||
AbuseTheForce.temp_switch_target
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user