build.sh: add task to automate launching development environment

This commit is contained in:
Starbeamrainbowlabs 2022-03-11 01:38:08 +00:00
parent b885ea5e3f
commit f1321d6c37
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -37,6 +37,7 @@ if [[ "$#" -lt 1 ]]; then
echo -e "${CSECTION}Available actions${RS}"; echo -e "${CSECTION}Available actions${RS}";
echo -e " ${CACTION}setup${RS} - Perform initial setup"; echo -e " ${CACTION}setup${RS} - Perform initial setup";
echo -e " ${CACTION}launch${RS} - Launch a 3-node development swarm"; echo -e " ${CACTION}launch${RS} - Launch a 3-node development swarm";
echo -e " ${CACTION}start-dev${RS} - As launch, but additionally starts a tab for esbuild.";
echo -e ""; echo -e "";
exit 1; exit 1;
@ -74,6 +75,17 @@ task_setup() {
} }
task_start-dev() {
set_title "systemquery:dev";
task_begin "Launching esbuild";
terminal_tab "systemquery:build" bash -c "npm run watch; read -p 'Press enter to exit....';";
task_end "$?";
task_launch;
}
task_launch() { task_launch() {
task_begin "Launching swarm"; task_begin "Launching swarm";