mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 22:27:59 +01:00
Add dev shim to upload task for local testing
This commit is contained in:
parent
4e7b9016bc
commit
d67fd7ebb7
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,14 @@ defmodule Mix.Tasks.UploadToS3 do
|
|||
def run([concurrency | args]) do
|
||||
{concurrency, _} = Integer.parse(concurrency)
|
||||
|
||||
if Enum.member?(args, "--dev") do
|
||||
Application.put_env(:philomena, :advert_file_root, "priv/static/system/images/adverts")
|
||||
Application.put_env(:philomena, :avatar_file_root, "priv/static/system/images/avatars")
|
||||
Application.put_env(:philomena, :badge_file_root, "priv/static/system/images")
|
||||
Application.put_env(:philomena, :image_file_root, "priv/static/system/images")
|
||||
Application.put_env(:philomena, :tag_file_root, "priv/static/system/images")
|
||||
end
|
||||
|
||||
if Enum.member?(args, "--adverts") do
|
||||
file_root = Application.fetch_env!(:philomena, :advert_file_root)
|
||||
new_file_root = System.get_env("NEW_ADVERT_FILE_ROOT", "adverts")
|
||||
|
|
Loading…
Reference in a new issue