rename "repository_path" variable to "platform_repository_folder"

This commit is contained in:
Vokhmin Alexey V 2012-12-29 20:52:17 +04:00
parent e5f1851f9b
commit d8a535412d
1 changed files with 7 additions and 7 deletions

View File

@ -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)