2019-06-08 08:15:49 -06:00
|
|
|
#!/bin/sh
|
|
|
|
# XXX: This should be removed when elixir's releases get custom command support
|
2019-06-13 13:16:57 -06:00
|
|
|
if [ -z "$1" ] || [ "$1" = "help" ]; then
|
2019-06-09 04:33:44 -06:00
|
|
|
echo "Usage: $(basename "$0") COMMAND [ARGS]
|
|
|
|
|
|
|
|
The known commands are:
|
|
|
|
|
2019-06-09 04:34:58 -06:00
|
|
|
create Create database schema (needs to be executed only once)
|
|
|
|
migrate Execute database migrations (needs to be done after updates)
|
|
|
|
rollback [VERSION] Rollback database migrations (needs to be done before downgrading)
|
2019-06-09 04:33:44 -06:00
|
|
|
|
|
|
|
and any mix tasks under Pleroma namespace, for example \`mix pleroma.user COMMAND\` is
|
2019-06-10 05:47:22 -06:00
|
|
|
equivalent to \`$(basename "$0") user COMMAND\`
|
2019-06-09 04:33:44 -06:00
|
|
|
"
|
|
|
|
else
|
|
|
|
SCRIPT=$(readlink -f "$0")
|
|
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
2019-06-13 13:16:57 -06:00
|
|
|
"$SCRIPTPATH"/pleroma eval 'Pleroma.ReleaseTasks.run("'"$*"'")'
|
2019-06-09 04:33:44 -06:00
|
|
|
fi
|