We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f8fa1d commit 1e3ef53Copy full SHA for 1e3ef53
exe/runa
@@ -56,10 +56,15 @@ class RunaCli < Thor
56
desc "deploy SCRIPT_FILE DEPLOY_PATH", "Deploy scripts for production execution"
57
def deploy(script_file, deploy_path)
58
root_dir = File.expand_path(".")
59
- deploy_script_name = File.basename(script_file, ".*")
60
deploy_load_path_script
61
- path = File.join(deploy_path, deploy_script_name)
62
- path += ".bat" if OS.windows?
+ path = nil
+ if File.directory?(deploy_path)
+ deploy_script_name = File.basename(script_file, ".*")
63
+ path = File.join(deploy_path, deploy_script_name)
64
+ path += ".bat" if OS.windows?
65
+ else
66
+ path = deploy_path
67
+ end
68
if !File.exist?(path)
69
File.write(path, deploy_script(root_dir, script_file))
70
puts "Deploy execution script to '#{path}'."
0 commit comments