nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
98 stars 526 forks source link

Fix capture-build-details.sh to work with detached state or tags #378

Closed dnzxy closed 3 months ago

dnzxy commented 3 months ago

Fixes build so that Trio can be built from a detached state (single commit checked out) or tags.

Thank you @bjorkert 🙏

marionbarker commented 3 months ago

Status

Success

Tested building a detached HEAD

Background

Previously when checking out an earlier commit of a given branch and leaving it as a detached HEAD, the capture-build-details.sh failed when trying to build because there was no branch.

Test

Update local clone to

git commit --allow-empty -m "empty commit"
git checkout 8811afe0
xed .

Build was successful

bjornoleh commented 3 months ago

Merging with two approvals.