28 lines
628 B
Ruby
28 lines
628 B
Ruby
namespace :jam_tracks do
|
|
|
|
task dry_run: :environment do |task, args|
|
|
JamTrackImporter.dry_run
|
|
end
|
|
|
|
task sync: :environment do |task, args|
|
|
path = ENV['TRACK_PATH']
|
|
|
|
if !path
|
|
puts "TRACK_PATH must be set to something like AD DC/Back in Black"
|
|
exit(1)
|
|
end
|
|
|
|
JamTrackImporter.synchronize_from_meta("audio/#{path}/meta.yml", skip_audio_upload:false)
|
|
end
|
|
|
|
task sync_all: :environment do |task, args|
|
|
|
|
JamTrackImporter.synchronize_all(skip_audio_upload:false)
|
|
end
|
|
|
|
task sync_all_dev: :environment do |task, args|
|
|
|
|
JamTrackImporter.synchronize_all(skip_audio_upload:true)
|
|
end
|
|
end
|