8000 Avoid unnecessary detached HEAD state in `boot.sh` and check out `stable` branch in `migrate.sh` by rmacklin · Pull Request #240 · omacom/omakub · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/omakub-sub/migrate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cd $OMAKUB_PATH
last_updated_at=$(git log -1 --format=%cd --date=unix)
git checkout stable
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I'm not sure about is whether omakub upgrade is supposed to be usable if you've originally installed master rather than stable. If so, this line might be undesirable.

Maybe it's better to drop this line, and just rely on the fixed boot.sh...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually ,yes, on second thought I think you're right.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Apologies for not spotting the impact to the upgrade flow in the original PR. Probably warrants a mention in the release notes to instruct users to run cd $OMAKUB_PATH && git checkout stable if they encounter "You are not currently on a branch" errors when trying to upgrade.

git pull

for file in $OMAKUB_PATH/migrations/*.sh; do
Expand Down
2 changes: 1 addition & 1 deletion boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
0