File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 run : bash setup.sh
2727 env :
2828 CI : " true"
29+ GH_TOKEN : ${{ github.token }}
2930
3031 - name : Install bats
3132 run : sudo apt-get install -y -qq bats
Original file line number Diff line number Diff line change @@ -410,6 +410,27 @@ fmt_header "Migrations"
410410
411411run_migrations " $SCRIPT_DIR "
412412
413+ # ---------------------------------------------------------------------------
414+ # Work directory
415+ # ---------------------------------------------------------------------------
416+
417+ WORK_DIR=" $HOME /Work"
418+ DEVSETUP_DIR=" $WORK_DIR /devsetup"
419+
420+ fmt_header " Work Directory"
421+
422+ mkdir -p " $WORK_DIR "
423+ fmt_ok " $WORK_DIR ready"
424+
425+ if [ -d " $DEVSETUP_DIR /.git" ]; then
426+ fmt_ok " devsetup already at $DEVSETUP_DIR "
427+ elif gh auth status > /dev/null 2>&1 ; then
428+ fmt_install " Cloning devsetup to $DEVSETUP_DIR "
429+ gh repo clone " ${DEVSETUP_REPO:- trusted/ devsetup} " " $DEVSETUP_DIR " -- --quiet
430+ else
431+ echo " Skipping devsetup clone (gh not authenticated)."
432+ fi
433+
413434# ---------------------------------------------------------------------------
414435# Done
415436# ---------------------------------------------------------------------------
@@ -419,6 +440,6 @@ echo "= Trusted Dev Setup Complete ="
419440echo " "
420441echo " Next steps:"
421442echo " 1. Open a new terminal (or run: source ~/.zshrc)"
422- echo " 2. Clone a project: gh repo clone trusted/<repo-name>"
443+ echo " 2. Clone a project: cd ~/Work && gh repo clone trusted/<repo-name>"
423444echo " 3. Run project setup: cd <repo-name> && bin/setup"
424445echo " "
Original file line number Diff line number Diff line change 9191@test " migration state directory exists" {
9292 [ -d " $HOME /.local/state/trusted/devsetup/migrations" ]
9393}
94+
95+ # ---------------------------------------------------------------------------
96+ # Work directory
97+ # ---------------------------------------------------------------------------
98+
99+ @test " ~/Work directory exists" {
100+ [ -d " $HOME /Work" ]
101+ }
102+
103+ @test " devsetup is cloned to ~/Work/devsetup" {
104+ [ -d " $HOME /Work/devsetup/.git" ]
105+ }
106+
107+ @test " ~/Work/devsetup contains setup.sh" {
108+ [ -f " $HOME /Work/devsetup/setup.sh" ]
109+ }
You can’t perform that action at this time.
0 commit comments