refactor: move external procfile manipulation into triggers
This also cleans up the internal APIs a bit.
This commit is contained in:
18
plugins/ps/procfile-remove
Executable file
18
plugins/ps/procfile-remove
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-ps-procfile-remove() {
|
||||
declare desc="ps procfile-remove plugin trigger"
|
||||
declare trigger="procfile-remove"
|
||||
declare desc="remove procfile for a given app"
|
||||
declare APP="$1" PROCFILE_PATH="$2"
|
||||
|
||||
if [[ -z "$PROCFILE_PATH" ]]; then
|
||||
PROCFILE_PATH="$DOKKU_LIB_ROOT/data/ps/$APP/Procfile.extracted"
|
||||
fi
|
||||
|
||||
rm "$PROCFILE_PATH"
|
||||
}
|
||||
|
||||
trigger-ps-procfile-remove "$@"
|
||||
Reference in New Issue
Block a user