-
Notifications
You must be signed in to change notification settings - Fork 41
/
devenv.sh
executable file
·24 lines (16 loc) · 1.06 KB
/
devenv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
set -euo pipefail
session_name='k8s-openapi'
max_version='1.31'
if ! tmux has-session -t "=$session_name"; then
cd "$(dirname "$0")"
tmux new-session -d -s "$session_name" -n '0'
tmux select-pane -t "$session_name:0.0" -T 'git'
tmux split-window -t "$session_name:0.0" -h -l 50% "sleep 0.5 && echo 'clear; K8S_RECORD_=1 ./test.sh $max_version run-tests' && exec bash -l"
tmux select-pane -t "$session_name:0.1" -T 'tests'
tmux split-window -t "$session_name:0.0" -v -l 50% $'cd ./k8s-openapi-codegen && sleep 0.5 && echo \'clear; cargo build && time bash -c "set -euo pipefail; cargo run --color always 2>&1 | ts" && cargo +stable clippy && echo "stable clippy OK" && cargo clippy\' && exec bash -l'
tmux select-pane -t "$session_name:0.1" -T 'codegen'
tmux split-window -t "$session_name:0.2" -v -l 50% "sleep 0.5 && echo 'clear; ./ci/global.sh && K8S_OPENAPI_ENABLED_VERSION=$max_version ./ci/per_version.sh; echo \$?' && exec bash -l"
tmux select-pane -t "$session_name:0.3"
fi
exec tmux attach-session -t "=$session_name"