feat: wowmine: more abilites to debug version
This commit is contained in:
Executable → Regular
+13
-2
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user