diff --git a/docs/clay-contrast-beta104.md b/docs/clay-contrast-beta104.md index e3950ed..fbe28fa 100644 --- a/docs/clay-contrast-beta104.md +++ b/docs/clay-contrast-beta104.md @@ -38,4 +38,3 @@ Reçu : `build/beta104-artifact.json`. Les GameTests dédiés restent exclus. Aucun monde, canal ou installation personnelle modifié ; archives locales uniquement. - diff --git a/docs/clay-workshop-integration-beta110.md b/docs/clay-workshop-integration-beta110.md index 5407a49..37a0a8a 100644 --- a/docs/clay-workshop-integration-beta110.md +++ b/docs/clay-workshop-integration-beta110.md @@ -95,3 +95,8 @@ Reçu : `build/integration110-artifact.json`, manifeste des sources : Les essais natifs sont macOS avec serveur intégré ; pas de test Windows ni connexion depuis un second ordinateur. La neige antérieure non suivie garde la limite de fonte documentée dans beta.109. + +Le script de publication a été corrigé pour autoriser uniquement `icon.png` +en plus des manifestes TOML, après contrôle de l'index et comparaison à l'icône +source. Les JAR restent exclusivement des pièces jointes de release. Cette +correction de distribution ne change aucun binaire ni le tag source beta.110. diff --git a/docs/colored-bricks-order-beta103.md b/docs/colored-bricks-order-beta103.md index e93b9c9..64104f9 100644 --- a/docs/colored-bricks-order-beta103.md +++ b/docs/colored-bricks-order-beta103.md @@ -31,4 +31,3 @@ de débogage changent). Reçu : `build/beta103-artifact.json`. Les GameTests du serveur dédié restent exclus. Aucun monde personnel, aucune installation ni aucun canal de distribution modifié. - diff --git a/docs/packwiz.md b/docs/packwiz.md index 917e2e7..8b1ba19 100644 --- a/docs/packwiz.md +++ b/docs/packwiz.md @@ -8,7 +8,8 @@ https://git.botsu.net/koka/sanctuary-beta/raw/branch/packwiz/pack.toml ``` Les sources sont sur la branche de travail du ticket. La branche `packwiz` -contient uniquement les manifestes de distribution produits par le build ; les +contient les manifestes de distribution produits par le build et l’icône +`icon.png` déclarée dans leur index ; les JAR Sanctuary sont des pièces jointes de releases Gitea. Aucun JAR de mod ou dépendance téléchargée n'entre dans l'historique Git. Le canal Beta est distinct de l'ancien pack 26.2. diff --git a/scripts/publish_pack.py b/scripts/publish_pack.py index bc7fb33..24ed4b2 100644 --- a/scripts/publish_pack.py +++ b/scripts/publish_pack.py @@ -115,12 +115,21 @@ def remote_tag_commit(tag): return found.get('refs/tags/' + tag + '^{}') or found.get('refs/tags/' + tag) +def channel_file(relative): + """The indexed pack icon is the only non-TOML file allowed on the channel.""" + path = Path(relative) + return path.suffix == '.toml' or path.as_posix() == 'icon.png' + + def publish_channel(origin, version, source_head): staged = ROOT / 'build/packwiz-release' pack.check_index(staged) files = [path for path in staged.rglob('*') if path.is_file()] - pack.require(all(path.suffix == '.toml' for path in files), - 'Distribution branch must contain only generated TOML metadata') + pack.require(all(channel_file(path.relative_to(staged)) for path in files), + 'Distribution branch must contain only generated TOML metadata and the pack icon') + if (staged / 'icon.png').exists(): + pack.require((staged / 'icon.png').read_bytes() == (ROOT / 'packwiz/icon.png').read_bytes(), + 'Distribution icon differs from the verified source icon') remote = git('ls-remote', '--heads', 'origin', 'refs/heads/' + CHANNEL) with tempfile.TemporaryDirectory(prefix='sanctuary-pack-channel-') as temp: directory = Path(temp) @@ -134,7 +143,7 @@ def publish_channel(origin, version, source_head): git('fetch', '--quiet', 'origin', CHANNEL, cwd=directory) git('checkout', '--quiet', '-b', CHANNEL, 'FETCH_HEAD', cwd=directory) tracked = git('ls-files', cwd=directory).splitlines() - pack.require(all(name.endswith('.toml') for name in tracked), + pack.require(all(channel_file(name) for name in tracked), 'Existing distribution branch contains unexpected files') for name in tracked: (directory / name).unlink()