From ccd6baf11ac0d17e34172371c9c2dcfc2fdfa5c4 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sun, 25 Apr 2021 15:04:01 +1200 Subject: [PATCH] enhance piston script --- piston | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/piston b/piston index 94b0fe1..405fa9b 100755 --- a/piston +++ b/piston @@ -1,2 +1,23 @@ #!/usr/bin/env bash -node cli/index.js "$@" \ No newline at end of file + +case $1 in + dev) + shift + docker-compose -f docker-compose.dev.yaml "$@" + ;; + prod) + shift + docker-compose -f docker-compose.yaml "$@" + ;; + update) + git pull + docker-compose build api + docker-compose up api -d + ;; + clean-pkgs) + git clean -fqXd packages + ;; + *) + node cli/index.js "$@" + ;; +esac \ No newline at end of file