From a2c58a6cc60d1288ddec630aedc9e288a0ee7a65 Mon Sep 17 00:00:00 2001 From: limepotato Date: Sun, 15 Sep 2024 20:09:45 -0600 Subject: [PATCH] update build script --- .gitignore | 2 +- build.sh | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 978010b..8c58cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # build output -dist/ +build/ # generated types .astro/ diff --git a/build.sh b/build.sh index 799c005..131cda4 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,36 @@ #!/bin/bash -pnpm i -pnpm run build -./backend/gradlew shadowJar \ No newline at end of file +read -p "build the frontend? Yes(y) / No(n) / Cancel(c):- " choice +if [ "$choice" = "y" ]; then + echo "building static site!" + pnpm i + pnpm run build + read -p "build the backend? Yes(y) / No(n) / Cancel(c):- " choice + if [ "$choice" = "y" ]; then + echo "building backend!" + cd backend + ./gradlew shadowJar + elif [ "$choice" = "n" ]; then + echo "exiting..." + elif [ "$choice" = "c" ]; then + echo "build cancelled" + else + echo "no choice given, exiting..." + fi +elif [ "$choice" = "n" ]; then + read -p "build the backend? Yes(y) / No(n) / Cancel(c):- " choice + if [ "$choice" = "y" ]; then + echo "building backend!" + cd backend + ./gradlew shadowJar + elif [ "$choice" = "n" ]; then + echo "exiting..." + elif [ "$choice" = "c" ]; then + echo "build cancelled" + else + echo "no choice given, exiting..." + fi +elif [ "$choice" = "c" ]; then + echo "Installation cancelled" +else + echo "No Choice given, exiting..." +fi