mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 21:35:59 +00:00
fix(desktop): address KDE feedback and keep local builds in sync with CI (#488)
This commit is contained in:
1 parent
c761b83112
commit
d99ed8e00b
41 files changed
+1252
-191
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""Check the engine before modifying build assets; never rebuild for a daemon error."""
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def run(*args):
|
||||
try:
|
||||
return subprocess.run(['docker', *args], capture_output=True, text=True, timeout=15)
|
||||
except subprocess.TimeoutExpired:
|
||||
sys.exit('Docker is not responding. Restart Docker Desktop, then rerun tools/build_local.sh.')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
engine = run('info', '--format', '{{.ServerVersion}}')
|
||||
if engine.returncode:
|
||||
sys.exit('Docker is unavailable: ' + engine.stderr.strip())
|
||||
image = run('image', 'inspect', sys.argv[1])
|
||||
if image.returncode:
|
||||
if 'No such image' not in image.stderr:
|
||||
sys.exit('Cannot inspect the build image: ' + image.stderr.strip())
|
||||
repo = Path(__file__).resolve().parents[1]
|
||||
subprocess.run(['docker', 'build', '--platform', 'linux/amd64', '-t', sys.argv[1],
|
||||
'-f', str(repo / 'tools/local-cross.Dockerfile'), str(repo)], check=True)
|
||||
Reference in new issue
Block a user