mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 06:43:40 +08:00
33 lines
729 B
Plaintext
33 lines
729 B
Plaintext
|
#!/usr/bin/env ruby
|
||
|
# frozen_string_literal: true
|
||
|
|
||
|
require_relative "../lib/migrations"
|
||
|
|
||
|
module Migrations
|
||
|
load_gemfiles("common")
|
||
|
configure_zeitwerk("lib/common", "lib/converters")
|
||
|
|
||
|
module Convert
|
||
|
class CLI < Thor
|
||
|
desc "execute", "Run the conversion"
|
||
|
|
||
|
def execute
|
||
|
FileUtils.mkdir_p("/tmp/converter")
|
||
|
|
||
|
::Migrations::IntermediateDatabaseMigrator.reset!("/tmp/converter/intermediate.db")
|
||
|
::Migrations::IntermediateDatabaseMigrator.migrate("/tmp/converter/intermediate.db")
|
||
|
|
||
|
# require_relative "converters/pepper/main"
|
||
|
end
|
||
|
|
||
|
desc "version", "Print the version"
|
||
|
|
||
|
def version
|
||
|
puts "0.0.1"
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
Migrations::Convert::CLI.start(ARGV)
|