diff --git a/Justfile b/Justfile index b69e4fa..edbfd0e 100644 --- a/Justfile +++ b/Justfile @@ -5,10 +5,9 @@ dev +command: deploy build="": git pull - # Set variable for build option - {{ set build_option = if build != "" { "--build" } else { "" } }} - docker compose up {{ build_option }} --pull=always -d - # Set variable for restart command - {{ set restart_cmd = if build == "" { "docker compose restart website" } else { "" } }} - {{ restart_cmd }} + # Use shell scripting for conditional logic + BUILD_OPTION="{{ if build != "" { "--build" } else { "" } }}" + docker compose up $BUILD_OPTION --pull=always -d + # Use shell scripting for conditional logic + if [ -z "{{ build }}" ]; then docker compose restart website; fi docker system prune -f \ No newline at end of file