Merge pull request #240 from rmacklin/checkout-stable-branch

Avoid unnecessary detached HEAD state in `boot.sh` and check out `stable` branch in `migrate.sh`
This commit is contained in:
David Heinemeier Hansson
2024-08-02 23:17:48 +02:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
cd $OMAKUB_PATH
last_updated_at=$(git log -1 --format=%cd --date=unix)
git checkout stable
git pull
for file in $OMAKUB_PATH/migrations/*.sh; do

View File

@@ -20,7 +20,7 @@ rm -rf ~/.local/share/omakub
git clone https://github.com/basecamp/omakub.git ~/.local/share/omakub >/dev/null
if [[ $OMAKUB_REF != "master" ]]; then
cd ~/.local/share/omakub
git fetch origin "${OMAKUB_REF:-stable}" && git checkout FETCH_HEAD
git fetch origin "${OMAKUB_REF:-stable}" && git checkout "${OMAKUB_REF:-stable}"
cd -
fi