Infra

Upgrading an app

The generated app never imports Bogie, so a new Bogie release changes nothing in an app until you ask. bogie app:update is the asking: rails app:update, done as a three-way merge.

Upgrade

go install github.com/bogie-go/bogie@latest   # v0.2.8 as of this build
cd blog
git commit -am "before app:update"            # it refuses a dirty tree
bogie app:update --pretend                    # the report only; nothing written
bogie app:update

How the merge works

bogie.toml records the Bogie version that generated the app. app:update renders what that version generated (the base), renders what the installed version generates (theirs), and merges each template-owned file on disk (ours, with your edits) using git merge-file:

  • A file you never touched updates silently.
  • A file you edited where the template did not change merges cleanly.
  • Only a real overlap leaves conflict markers, and the report names those files.

Files the templates never produced, everything bogie g and you wrote, are not touched. Afterwards bogie.toml records the new version, go mod tidy runs, and bogie doctor checks the markers. Because the tree was clean, the whole upgrade is one reviewable diff.

What it does not carry

Only files the tool templates into an app. A change inside Bogie itself, such as v0.2.4's string now being varchar, affects what generators write from then on and leaves existing migrations alone. A change in shape, such as v0.2.6's move from SQL seeds to Go seeds, brings in the new layout but does not translate content: port old seeds by hand first. Each release note says which kind it is.