mirror of
https://github.com/ViViDboarder/abuse-the-force.git
synced 2024-11-24 08:26:26 +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 a new target was provided, switch to it
|
||||||
if options[:target] != nil
|
if options[:target] != nil
|
||||||
AbuseTheForce.temp_switch_target(options[:target])
|
target = options[:target]
|
||||||
end
|
end
|
||||||
if target != nil
|
if target != nil
|
||||||
AbuseTheForce.temp_switch_target(target)
|
AbuseTheForce.temp_switch_target target
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy the project
|
# Deploy the project
|
||||||
AbuseTheForce.deploy_project()
|
AbuseTheForce.deploy_project()
|
||||||
|
|
||||||
# if using a temp target, switch back
|
# if using a temp target, switch back
|
||||||
if options[:target] != nil
|
if target != nil
|
||||||
AbuseTheForce.temp_switch_target
|
AbuseTheForce.temp_switch_target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -279,7 +279,7 @@ module AbuseTheForce
|
|||||||
|
|
||||||
# If a new target was provided, switch to it
|
# If a new target was provided, switch to it
|
||||||
if options[:target] != nil
|
if options[:target] != nil
|
||||||
AbuseTheForce.temp_switch_target(options[:target])
|
AbuseTheForce.temp_switch_target options[:target]
|
||||||
end
|
end
|
||||||
|
|
||||||
# No metadata passed in, this should be a file path
|
# No metadata passed in, this should be a file path
|
||||||
@ -318,18 +318,21 @@ module AbuseTheForce
|
|||||||
end
|
end
|
||||||
|
|
||||||
desc "project", "Retrieve a whole project"
|
desc "project", "Retrieve a whole project"
|
||||||
def project()
|
def project(target=nil)
|
||||||
|
|
||||||
# If a new target was provided, switch to it
|
# If a new target was provided, switch to it
|
||||||
if options[:target] != nil
|
if options[:target] != nil
|
||||||
AbuseTheForce.temp_switch_target options[:target]
|
target = options[:target]
|
||||||
|
end
|
||||||
|
if target != nil
|
||||||
|
AbuseTheForce.temp_switch_target target
|
||||||
end
|
end
|
||||||
|
|
||||||
# Retrieve the project
|
# Retrieve the project
|
||||||
AbuseTheForce.retrieve_project
|
AbuseTheForce.retrieve_project
|
||||||
|
|
||||||
# if using a temp target, switch back
|
# if using a temp target, switch back
|
||||||
if options[:target] != nil
|
if target != nil
|
||||||
AbuseTheForce.temp_switch_target
|
AbuseTheForce.temp_switch_target
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user