v0.29.2
This commit is contained in:
1 parent
76cb4acef0
commit
68678e98be
84 files changed
+1519
-325
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Keep executable release identity derived from the Cargo package version."""
|
||||
from pathlib import Path
|
||||
import sys
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
||||
from scripts.version import project_version
|
||||
root = Path(__file__).resolve().parents[2]
|
||||
version = project_version(root)
|
||||
for name in ('src/main/bootstrap.rs','src/main/tasks.rs','src/web_server/fastcgi/protocol.rs','src/web_server/response/file.rs','dev.sh','scripts/deploy/upgrade.py','make_zip.py'):
|
||||
text = (root/name).read_text(encoding='utf-8')
|
||||
assert f'RustProxy {version}' not in text and f'RustProxy/{version}' not in text, f'hardcoded runtime version: {name}'
|
||||
assert 'env!("CARGO_PKG_VERSION")' in (root/'src/web_server/fastcgi/protocol.rs').read_text()
|
||||
assert 'env!("CARGO_PKG_VERSION")' in (root/'src/web_server/response/file.rs').read_text()
|
||||
assert '__RUSTPROXY_VERSION__' in (root/'src/admin/web/index.html').read_text()
|
||||
assert 'OnceLock<String>' in (root/'src/admin/public.rs').read_text()
|
||||
assert 'include_str!("web/index.html")' in (root/'src/admin/public.rs').read_text()
|
||||
assert 'env!("CARGO_PKG_VERSION")' in (root/'src/admin/public.rs').read_text()
|
||||
assert 'admin_index.html' not in (root/'build.rs').read_text()
|
||||
assert 'project_version' in (root/'make_zip.py').read_text()
|
||||
print(f'PASS: executable version comes from Cargo.toml ({version})')
|
||||
Reference in new issue
Block a user