team113 / messenger

Open-source front-end part of messenger by team113
GNU Affero General Public License v3.0
14 stars 13 forks source link

Throw `Exception`s, when `PubspecBuilder` is unable to use `git` #1054

Closed SleepySquash closed 3 days ago

SleepySquash commented 3 days ago

Synopsis

PubspecBuilder prints a warning, when it's unable to use git. However, this caused Linux build to silently fail to populate the ref value used for UpgradeWorker to determine whether application's upgrade is available or not.

Solution

This PR refactors PubspecBuilder to throw Exceptions instead of printing a warnings, when git isn't available.

The only downside is longer execution of checkout step: it'll grow from 1-2 seconds up to 5-10 seconds for each job, because GitHub Runner will have to fetch the whole Git history instead of only the branch it's on.

Checklist

SleepySquash commented 3 days ago

FCM

Refactor `PubspecBuilder` to throw `Exception` when Git can't be executed (#1054)