Created
July 18, 2019 14:13
-
-
Save armando-couto/c3af056d9b2721d61d5d7e6bddf7a56f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/ftp' | |
CONTENT_SERVER_DOMAIN_NAME = "IP" | |
CONTENT_SERVER_FTP_LOGIN = "USER" | |
CONTENT_SERVER_FTP_PASSWORD = "PASSWORD" | |
# upload files to nested directory | |
TXT_FILE_OBJECT = File.new("./build/libs/infarma-reports.jar") | |
name = File.basename(TXT_FILE_OBJECT).split "." | |
Net::FTP.open(CONTENT_SERVER_DOMAIN_NAME, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp| | |
ftp.putbinaryfile(TXT_FILE_OBJECT, "/Volume_1/Setores/Desenvolvimento/Versoes_Reports/P&D/#{name[0]}-#{DateTime.now.strftime("%d-%m-%Y-%H-%M")}.jar") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment