Skip to content

Commit

Permalink
Improve make file commands
Browse files Browse the repository at this point in the history
* if the TMux window is closed in some other way than Ctrl+b, Q then `make up` will error, throwing duplicate session - this change checks for a session and removes the grapher session if it's found before going back to where the contributor was
  • Loading branch information
toni-sharpe committed May 20, 2024
1 parent ccb1186 commit 89ad915
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ up: require create-if-missing.env ../owid-content tmp-downloads/owid_metadata.sq

@echo '==> Starting dev environment'
@mkdir -p logs

@if tmux has-session; then \
tmux kill-session -t grapher; \
fi
tmux new-session -s grapher \
-n docker 'docker compose -f docker-compose.grapher.yml up' \; \
set remain-on-exit on \; \
Expand All @@ -77,6 +81,10 @@ up.devcontainer: create-if-missing.env.devcontainer tmp-downloads/owid_metadata.

@echo '==> Starting dev environment'
@mkdir -p logs

@if tmux has-session; then \
tmux kill-session -t grapher; \
fi
tmux new-session -s grapher \
-n admin \
'devTools/docker/wait-for-mysql.sh && yarn startAdminDevServer' \; \
Expand All @@ -100,6 +108,10 @@ up.full: require create-if-missing.env.full ../owid-content tmp-downloads/owid_m
yarn lerna run build

@echo '==> Starting dev environment'

@if tmux has-session; then \
tmux kill-session -t grapher; \
fi
tmux new-session -s grapher \
-n docker 'docker compose -f docker-compose.grapher.yml up' \; \
set remain-on-exit on \; \
Expand Down

0 comments on commit 89ad915

Please sign in to comment.