Fix same-day nightly update detection in Sparkle (#173)
* Fix nightly build version monotonicity for Sparkle updates * Include run attempt in nightly build version
This commit is contained in:
parent
7b2675cd1e
commit
305d22e4e6
1 changed files with 8 additions and 2 deletions
10
.github/workflows/nightly.yml
vendored
10
.github/workflows/nightly.yml
vendored
|
|
@ -180,8 +180,14 @@ jobs:
|
|||
NIGHTLY_DATE=$(date -u +%Y%m%d)
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${BASE_MARKETING}-nightly.${NIGHTLY_DATE}" "$APP_PLIST"
|
||||
|
||||
# Build number: monotonic YYYYMMDDNN integer for clean Sparkle comparisons
|
||||
NIGHTLY_BUILD="${NIGHTLY_DATE}01"
|
||||
# Build number: unique/monotonic per workflow run attempt so same-day
|
||||
# nightlies and reruns still compare as newer in Sparkle.
|
||||
if [ -n "${GITHUB_RUN_ID:-}" ]; then
|
||||
RUN_ATTEMPT="$(printf '%02d' "${GITHUB_RUN_ATTEMPT:-1}")"
|
||||
NIGHTLY_BUILD="${GITHUB_RUN_ID}${RUN_ATTEMPT}"
|
||||
else
|
||||
NIGHTLY_BUILD="${NIGHTLY_DATE}000000"
|
||||
fi
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${NIGHTLY_BUILD}" "$APP_PLIST"
|
||||
|
||||
# Embed commit SHA for bug reports
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue