Stamp locally packaged macOS apps with their update identity

This commit is contained in:
FBukovina 2026-09-17 22:52:46 +02:00
commit b3130a8b0b
5 changed files with 139 additions and 2 deletions

View file

@ -23,7 +23,8 @@
#define APP_ID "org.maturita.Maturita"
/* Published builds bake in the commit they were made from (see COMMIT in the
* Makefile), which is what the updater compares against the build published
* in the repository. Local builds stay at "dev" and never offer an update. */
* in the repository. Plain source builds stay at "dev" and never offer an
* update; the macOS bundler supplies the checkout commit for local packages. */
#ifndef APP_COMMIT
#define APP_COMMIT "dev"
#endif

View file

@ -196,7 +196,7 @@ static gboolean same_commit(const char *a, const char *b) {
return ok;
}
/* Only builds published by CI carry a commit; see APP_COMMIT in maturita.h. */
/* Packaged builds carry a source commit; see APP_COMMIT in maturita.h. */
static gboolean is_published_build(void) {
return g_ascii_isxdigit(APP_COMMIT[0]) && strlen(APP_COMMIT) >= 7;
}