Skip to content

Commit

Permalink
Add path arugment to rake task for updating versions list file
Browse files Browse the repository at this point in the history
usage:
rake compact_index:update_versions_file["path_to_file/versions.list"]
  • Loading branch information
sonalkr132 committed Aug 30, 2016
1 parent deefb11 commit 1fb3042
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/tasks/compact_index.rake
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ namespace :compact_index do
end

desc "Generate/update the versions.list file"
task update_versions_file: :environment do
file_path = Rails.application.config.rubygems['versions_file_location']
versions_file = CompactIndex::VersionsFile.new file_path
task :update_versions_file, [:file_path] => :environment do |_t, args|
raise "#{args[:file_path]} does not exist" unless File.exist?(args[:file_path])
versions_file = CompactIndex::VersionsFile.new args[:file_path]

# Only indexed versions of a gem go into *new* versions file
query = ["SELECT r.name, v.created_at as date, v.info_checksum, v.number, v.platform
Expand Down

0 comments on commit 1fb3042

Please sign in to comment.