| name | refresh-main |
| description | Long-running script that resets main/ to upstream and rebuilds Quarkus hourly |
| user_invocable | true |
Refresh Main
Usage: /refresh-main
Creates and runs a long-running bash script that keeps main/ in sync with upstream. The script loops forever: fetch, reset, build, sleep 1 hour.
What the script does (each iteration)
-
Fetch and reset all repos:
for repo in quarkus hibernate-orm hibernate-reactive quarkus-website; do
cd ~/git/hibernate/main/$repo
git fetch upstream
git reset --hard upstream/main
done
-
Build Quarkus (only Quarkus, not the other repos):
cd ~/git/hibernate/main/quarkus
~/git/hibernate/scripts/build-fast.sh
-
Log the timestamp and build result.
-
Sleep 1 hour, then repeat.
Script location
Write the script to ~/git/hibernate/scripts/refresh-main.sh and make it executable.
Running
Run the script in the background or in a dedicated terminal tab:
~/git/hibernate/scripts/refresh-main.sh
The user can stop it with Ctrl+C at any time. The script should handle SIGINT gracefully (print a message and exit cleanly).