Skip to content

Commit

Permalink
Fix deploy task for db, closes #76
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneskaeufler committed Jul 28, 2018
1 parent d9f1e5f commit ba73970
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tasks/db_deploy.cr
Expand Up @@ -13,7 +13,15 @@ class Db::Deploy < LuckyCli::Task
copy_db_to_dropbox
open_dropbox_to_get_link
link = wait_for_public_link
restore_db_from_dump(link)
restore_db_from_dump(fix_dropbox_link(link))
end

private def fix_dropbox_link(link : Nil)
raise ArgumentError.new("Please enter a link.")
end

private def fix_dropbox_link(link : String) : String
link.gsub("www.dropbox.com", "dl.dropboxusercontent.com")
end

private def restore_db_from_dump(link)
Expand Down

0 comments on commit ba73970

Please sign in to comment.