Skip to content

Commit

Permalink
feat: print upload result
Browse files Browse the repository at this point in the history
  • Loading branch information
dabing1022 committed Jan 12, 2021
1 parent e05c950 commit 0ac06b1
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def spec_creator
end

#推送二进制
# curl http://ci.xxx:9192/frameworks -F "name=IMYFoundation" -F "version=7.7.4.2" -F "annotate=IMYFoundation_7.7.4.2_log" -F "file=@bin_zip/bin_IMYFoundation_7.7.4.2.zip"
# curl http://ci.xxx:9192/frameworks -F "name=IMYFoundation" -F "version=7.7.4.2" -F "annotate=IMYFoundation_7.7.4.2_log" -F "file=@bin-zip/bin_IMYFoundation_7.7.4.2.zip"
def curl_zip
zip_file = "#{CBin::Config::Builder.instance.library_file(@spec)}.zip"
res = File.exist?(zip_file)
Expand All @@ -52,11 +52,13 @@ def curl_zip
res = File.exist?(zip_file)
end
if res
command = "curl #{CBin.config.binary_upload_url} -F \"name=#{@spec.name}\" -F \"version=#{@spec.version}\" -F \"annotate=#{@spec.name}_#{@spec.version}_log\" -F \"file=@#{zip_file}\""
print <<EOF
上传二进制文件
curl #{CBin.config.binary_upload_url} -F "name=#{@spec.name}" -F "version=#{@spec.version}" -F "annotate=#{@spec.name}_#{@spec.version}_log" -F "file=@#{zip_file}"
#{command}
EOF
`curl #{CBin.config.binary_upload_url} -F "name=#{@spec.name}" -F "version=#{@spec.version}" -F "annotate=#{@spec.name}_#{@spec.version}_log" -F "file=@#{zip_file}"` if res
upload_result = `#{command}`
puts "#{upload_result}"
end

res
Expand Down

0 comments on commit 0ac06b1

Please sign in to comment.