From d8a535412df5cd365be697846949769ef2762cdd Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Sat, 29 Dec 2012 20:52:17 +0400 Subject: [PATCH] rename "repository_path" variable to "platform_repository_folder" --- lib/tasks/new_core.rake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/tasks/new_core.rake b/lib/tasks/new_core.rake index 864d64122..f1bee2a07 100644 --- a/lib/tasks/new_core.rake +++ b/lib/tasks/new_core.rake @@ -20,7 +20,7 @@ namespace :new_core do say "[#{Time.zone.now}] Starting to publish mass-build 317..." bl = BuildList.where(:mass_build_id => 73).first - repository_path = "#{bl.save_to_platform.path}/repository" + platform_repository_folder = "#{bl.save_to_platform.path}/repository" BuildList.where(:mass_build_id => 73). where("status != #{BuildServer::BUILD_ERROR}"). order(:id). @@ -31,18 +31,18 @@ namespace :new_core do sha1 = bl.results.find{ |r| r['file_name'] =~ /.*\.tar\.gz$/ }['sha1'] - system "cd #{repository_path} && curl -L -O http://file-store.rosalinux.ru/api/v1/file_stores/#{sha1}" - system "cd #{repository_path} && tar -xzf #{sha1}" - system "rm -f #{repository_path}/#{sha1}" + system "cd #{platform_repository_folder} && curl -L -O http://file-store.rosalinux.ru/api/v1/file_stores/#{sha1}" + system "cd #{platform_repository_folder} && tar -xzf #{sha1}" + system "rm -f #{platform_repository_folder}/#{sha1}" - archive_folder = "#{repository_path}/archives" + archive_folder = "#{platform_repository_folder}/archives" system "sudo chown root:root #{archive_folder}/SRC_RPM/*" system "sudo chmod 0666 #{archive_folder}/SRC_RPM/*" system "sudo chown root:root #{archive_folder}/RPM/*" system "sudo chmod 0666 #{archive_folder}/RPM/*" - system "sudo mv #{archive_folder}/SRC_RPM/* #{repository_path}/SRPMS/main/release/" - system "sudo mv #{archive_folder}/RPM/* #{repository_path}/#{bl.arch.name}/main/release/" + system "sudo mv #{archive_folder}/SRC_RPM/* #{platform_repository_folder}/SRPMS/main/release/" + system "sudo mv #{archive_folder}/RPM/* #{platform_repository_folder}/#{bl.arch.name}/main/release/" system "sudo rm -rf #{archive_folder}" bl.update_column(:status, BuildList::BUILD_PUBLISH)