refactor(windows): publish Velopack updates through Gitea Releases

This commit is contained in:
lingjhf committed 2026-10-06 12:56:31 +08:00
1 parent 826745b407
commit 1ef8edc8bc
17 files changed
+519 -87

No files matched your search

+10 -2
View File
@@ -54,6 +54,7 @@ def main():
definitions = work / 'defines.json'
definitions.write_text(json.dumps({'CUTDEX_UPDATE_SMOKE_ROOT': work.as_posix()}), encoding='utf-8')
environment = dict(os.environ, CUTDEX_WINDOWS_UPDATE_URL=f'http://127.0.0.1:{args.port}',
CUTDEX_WINDOWS_UPDATE_SOURCE='web',
CUTDEX_UPDATE_TEST_HTTP='1')
# Isolate Flutter caches, generated runner files and output from live builds.
source = work / 'source'
@@ -61,11 +62,14 @@ def main():
for name in ['windows']:
shutil.copytree(ROOT / name, source / name,
ignore=shutil.ignore_patterns('ephemeral', 'build', '__pycache__'))
configuration = source / 'windows/runner/update_configuration.cmake'
configuration.write_text(configuration.read_text().replace(
r'Software\\\\Cutdex\\\\', r'Software\\\\Cutdex\\\\UpdateSmoke\\\\'))
# Exercise the real Runner/update bridge with a small Flutter test entry.
# Media processing is covered separately and need not be rebuilt here.
(source / 'pubspec.yaml').write_text(
'name: cutdex_update_smoke\nversion: 1.0.0+1\n'
'environment:\n sdk: ^3.13.2\n'
'environment:\n sdk: ^3.13.4\n'
'dependencies:\n flutter:\n sdk: flutter\n'
f' deskup: {DESKUP_VERSION}\n'
'flutter:\n uses-material-design: true\n', encoding='utf-8')
@@ -103,7 +107,11 @@ def verify_update(work, port):
app = work / 'installed/Cutdex update test.exe'
process = None
try:
process = subprocess.Popen([str(app)], cwd=app.parent, creationflags=subprocess.CREATE_NO_WINDOW)
# The loopback fixture must not depend on a developer's HTTP proxy.
environment = {name: value for name, value in os.environ.items()
if name.lower() not in ('http_proxy', 'https_proxy', 'all_proxy')}
process = subprocess.Popen([str(app)], cwd=app.parent, env=environment,
creationflags=subprocess.CREATE_NO_WINDOW)
deadline = time.monotonic() + 240
while time.monotonic() < deadline:
if (work / 'failure.json').exists():