Compare commits

...

7 Commits

Author SHA1 Message Date
Ladd
54868aeba8 script result messages 2025-12-28 11:46:58 -06:00
Ladd
c3da34b294 script result messages 2025-12-28 11:46:15 -06:00
Ladd
702287d95a commit script result message 2025-12-28 11:43:48 -06:00
Ladd
76cc098697 commit script tweaks 2025-12-28 11:42:55 -06:00
Ladd
c27f53cd92 script fixup 2025-12-28 11:36:48 -06:00
Ladd
18869f1027 rename merge -> deploy 2025-12-28 11:34:44 -06:00
Ladd
6a8bbf8fe9 helper scripts for dev 2025-12-28 11:28:04 -06:00
4 changed files with 76 additions and 0 deletions

29
commit Executable file
View File

@ -0,0 +1,29 @@
#!/bin/env bash
if [[ $(hostname) != "ladd76" ]]; then
echo >&2 "host $(hostname) != 'ladd76'"
exit 1
fi
set -eo pipefail
git checkout dev
./sync
if git diff; then
git add .
git commit "$@"
git push
fi
ssh lentilz "
set -oe pipefail
export NVM_DIR=\"\$HOME/.nvm\"
[ -s \"\$NVM_DIR/nvm.sh\" ] && \. \"\$NVM_DIR/nvm.sh\" # This loads nvm
cd ~/code/gravity-dev
git add .
git stash
git pull
git stash apply
npm i
"
echo >&2
echo >&2 "Committed and deployed to https://laddhoffman.com/gravity-dev/"

18
deploy Executable file
View File

@ -0,0 +1,18 @@
#!/bin/env bash
if [[ $(hostname) != "ladd76" ]]; then
echo >&2 "host $(hostname) != 'ladd76'"
exit 1
fi
set -eo pipefail
git checkout main
git pull
git merge dev
git push
git checkout dev
ssh lentilz 'cd ~/code/gravity-live && git pull'
echo >&2
echo >&2 "Deployed to https://laddhoffman.com/gravity/"

17
merge Executable file
View File

@ -0,0 +1,17 @@
#!/bin/env bash
if [[ $(hostname) != "ladd76" ]]; then
echo >&2 "host $(hostname) != 'ladd76'"
exit 1
fi
set -eo pipefail
./commit
git checkout main
git pull
git merge dev
git push
git checkout dev
ssh lentilz 'cd ~/code/gravity-live && git pull'

12
sync Executable file
View File

@ -0,0 +1,12 @@
#!/bin/env bash
if [[ $(hostname) != "ladd76" ]]; then
echo >&2 "host $(hostname) != 'ladd76'"
exit 1
fi
rsync -ru --exclude='.git' --exclude='node_modules' ~/code/gravity-dev/ lentilz:code/gravity-dev/
rsync -ru --exclude='.git' --exclude='node_modules' lentilz:code/gravity-dev/ ~/code/gravity-dev/
echo >&2
echo >&2 "Synced with https://laddhoffman.com/gravity-dev/"