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 then ==> Checking your local environment has the necessary commands...
==> Validating your .env file for make up
.env file valid for make up
==> Checking port
==> Building grapher
yarn lerna run build

 >  Lerna (powered by Nx)   Running target build for 5 projects:

    - @ourworldindata/components
    - @ourworldindata/core-table
    - @ourworldindata/grapher
    - @ourworldindata/types
    - @ourworldindata/utils

> @ourworldindata/types:build  [existing outputs match the cache, left as is]

> @ourworldindata/utils:build  [existing outputs match the cache, left as is]

> @ourworldindata/core-table:build  [existing outputs match the cache, left as is]

> @ourworldindata/components:build  [existing outputs match the cache, left as is]

> @ourworldindata/grapher:build  [existing outputs match the cache, left as is]

�[34mCLI�[39m Building entry: src/index.ts
�[34mCLI�[39m Using tsconfig: tsconfig.src.json
�[34mCLI�[39m tsup v7.2.0
�[34mCLI�[39m Using tsup config: /Users/brainstem/owid-grapher/packages/@ourworldindata/grapher/tsup.config.ts
�[34mCLI�[39m Target: es2019
�[34mCLI�[39m Cleaning output folder
�[34mCJS�[39m Build start
�[34mDTS�[39m Build start
�[32mCJS�[39m �[1mdist/index.css     �[22m�[32m103.74 KB�[39m
�[32mCJS�[39m �[1mdist/index.css.map �[22m�[32m194.07 KB�[39m
�[32mCJS�[39m �[1mdist/index.js      �[22m�[32m1.38 MB�[39m
�[32mCJS�[39m �[1mdist/index.js.map  �[22m�[32m2.59 MB�[39m
�[32mCJS�[39m ⚡️ Build success in 1051ms
�[32mDTS�[39m ⚡️ Build success in 6581ms
�[32mDTS�[39m �[1mdist/index.d.ts �[22m�[32m64.51 KB�[39m

 >  Lerna (powered by Nx)   Successfully ran target build for 5 projects

   Nx read the output from the cache instead of running the command for 5 out of 5 tasks.

==> Starting dev environment
tmux new-session -s grapher \
		-n docker 'docker compose -f docker-compose.grapher.yml up' \; \
			set remain-on-exit on \; \
		set-option -g default-shell  /bin/zsh \; \
		new-window -n admin \
			'devTools/docker/wait-for-mysql.sh && yarn startAdminDevServer' \; \
			set remain-on-exit on \; \
		new-window -n vite 'yarn run startSiteFront' \; \
			set remain-on-exit on \; \
		new-window -n lerna 'yarn startLernaWatcher' \; \
			set remain-on-exit on \; \
		new-window -n welcome 'devTools/docker/banner.sh; exec  /bin/zsh' \; \
		bind R respawn-pane -k \; \
		bind X kill-pane \; \
		bind Q kill-server \; \
		set -g mouse on \
		|| make down
[exited] 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 5b0243e
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 5b0243e

Please sign in to comment.