ci: move back to non-tmux
This commit is contained in:
parent
1b49c2ac8f
commit
840a9bb00d
42
ci
42
ci
@ -8,32 +8,20 @@ set -x
|
||||
|
||||
NAME="CI"
|
||||
|
||||
if ! tmux ls | grep -q "^${NAME}:"; then
|
||||
tmux -2 new-session -d -s ${NAME}
|
||||
trap ci_error INT TERM
|
||||
|
||||
ci_branch=$(date +"%Y%m%dT%H%M%S%z")
|
||||
can_sign=0
|
||||
|
||||
for i in $(ssh-add -L | awk '{print $NF}'); do
|
||||
grep -q $i .allowed_signers && can_sign=1
|
||||
done
|
||||
|
||||
if [ $can_sign != 1 ]; then
|
||||
echo "Can't find signing key."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tmux -2 attach-session -t $NAME
|
||||
|
||||
if [ "$CMD" = "run" ]; then
|
||||
trap ci_error INT TERM
|
||||
|
||||
ci_branch=$(date +"%Y%m%dT%H%M%S%z")
|
||||
can_sign=0
|
||||
|
||||
for i in $(ssh-add -L | awk '{print $NF}'); do
|
||||
grep -q $i .allowed_signers && can_sign=1
|
||||
done
|
||||
|
||||
if [ $can_sign != 1 ]; then
|
||||
echo "Can't find signing key."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git checkout -b "${ci_branch}" || handle_co_fail
|
||||
nix flake update --commit-lock-file || handle_update_fail
|
||||
nix flake check || handle_check_fail
|
||||
else
|
||||
echo 'running "./ci run"'
|
||||
tmux select-window -t "=${NAME}:0"
|
||||
tmux send-keys -t "=${NAME}:0" "./ci run" ENTER
|
||||
fi
|
||||
git checkout -b "${ci_branch}" || handle_co_fail
|
||||
nix flake update --commit-lock-file || handle_update_fail
|
||||
nix flake check || handle_check_fail
|
||||
|
Loading…
Reference in New Issue
Block a user