Skip to content

Commit 1e3ef53

Browse files
committed
feat: Enabled to deploy by specifying a file name
1 parent 8f8fa1d commit 1e3ef53

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

exe/runa

+8-3
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,15 @@ class RunaCli < Thor
5656
desc "deploy SCRIPT_FILE DEPLOY_PATH", "Deploy scripts for production execution"
5757
def deploy(script_file, deploy_path)
5858
root_dir = File.expand_path(".")
59-
deploy_script_name = File.basename(script_file, ".*")
6059
deploy_load_path_script
61-
path = File.join(deploy_path, deploy_script_name)
62-
path += ".bat" if OS.windows?
60+
path = nil
61+
if File.directory?(deploy_path)
62+
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
6368
if !File.exist?(path)
6469
File.write(path, deploy_script(root_dir, script_file))
6570
puts "Deploy execution script to '#{path}'."

0 commit comments

Comments
 (0)