From 40749d8a987d6d39a8788eec71db5badef91c7f0 Mon Sep 17 00:00:00 2001 From: Richard Macklin Date: Fri, 2 Aug 2024 13:58:47 -0700 Subject: [PATCH] Ensure the stable branch is checked out before pulling in migrate.sh The checkout would be a no-op if already on `stable` (git would print `Already on 'stable'` but importantly would *not* return a failing exit code). It would fail if the user has local changes, but if they have local changes `git pull` would also fail, so there's no change there. --- bin/omakub-sub/migrate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/omakub-sub/migrate.sh b/bin/omakub-sub/migrate.sh index 6749731..cd06f29 100644 --- a/bin/omakub-sub/migrate.sh +++ b/bin/omakub-sub/migrate.sh @@ -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