feat: wowmine: more abilites to debug version

This commit is contained in:
2026-11-12 22:48:47 +00:00
parent 39f429a9da
commit e0a1ef293e
20 changed files with 887 additions and 15 deletions
Executable → Regular
+13 -2
View File
@@ -19,8 +19,10 @@ release = hashlib.sha256((root / 'pack/pack.toml').read_bytes()).hexdigest()
with tempfile.TemporaryDirectory(prefix='prism-publish-') as temporary:
archive = Path(temporary) / 'publish.tar.gz'
with tarfile.open(archive, 'w:gz') as tar:
for name in ['pack', 'WorldOfSosal-Prism.zip', 'latest.mrpack', 'SHA256SUMS', 'index.html']:
for name in ['pack', 'WorldOfSosal-Prism.zip', 'SHA256SUMS', 'index.html']:
tar.add(root / name, arcname=name)
for path in root.glob('*.mrpack'):
tar.add(path, arcname=path.name)
remote = f'/tmp/prism-publish-{release}.tar.gz'
subprocess.run(['scp', '-o', 'BatchMode=yes', str(archive), f'{host}:{remote}'], check=True)
script = '''set -eu
@@ -38,7 +40,16 @@ if test -d "$base/releases/$release"; then
else
mv "$stage/pack" "$base/releases/$release"
fi
for name in WorldOfSosal-Prism.zip latest.mrpack SHA256SUMS index.html; do
for source in "$stage"/*.mrpack; do
name=$(basename "$source")
if test "$name" != latest.mrpack && test -e "$base/$name"; then
cmp "$source" "$base/$name"
fi
done
for source in "$stage"/*.mrpack; do
mv "$source" "$base/$(basename "$source")"
done
for name in WorldOfSosal-Prism.zip SHA256SUMS index.html; do
mv "$stage/$name" "$base/$name"
done
ln -s "releases/$release" "$stage/current"