Skip to content

Commit 1442a00

Browse files
committed
Update flatpak script and runtime.
1 parent 7491ac8 commit 1442a00

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

flatpak/build.json.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "org.gtk.Gtk3theme.${name}",
33
"branch": "3.22",
44
"runtime": "org.freedesktop.Platform",
5-
"runtime-version": "22.08",
5+
"runtime-version": "23.08",
66
"sdk": "org.freedesktop.Sdk",
77
"build-extension": true,
88
"appstream-compose": false,
@@ -36,7 +36,7 @@
3636
"*"
3737
],
3838
"build-commands": [
39-
"install -D -m755 sass ${FLATPAK_DEST}/bin/sassc",
39+
"install -D -m755 sass ${FLATPAK_DEST}/bin/pysassc",
4040
"install -D -m755 src/dart ${FLATPAK_DEST}/bin/src/dart",
4141
"install -D -m755 src/sass.snapshot ${FLATPAK_DEST}/bin/src/sass.snapshot"
4242
],

flatpak/generate-flatpaks

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import webbrowser
99
import sys
1010
from pathlib import Path
1111

12-
if shutil.which("flatpak-builder") is None:
13-
print("You need to install flatpak-builder first")
12+
if shutil.which("flatpak-builder") is None or shutil.which("appstream-compose") is None:
13+
print("You need to install flatpak-builder and appstream-util first")
1414
quit()
1515

1616
TEST = input("Build and install to test? y/n: ") == "y"
@@ -49,7 +49,7 @@ THEMES = [
4949
VERSION = subprocess.run(["dpkg-parsechangelog", "--file", "../debian/changelog", "--show-field", "Version"], capture_output=True, text=True).stdout.strip("\n ")
5050

5151
# we don't always 'git tag', search the commit message for the matching version
52-
escaped_ver = VERSION.replace(".", "\.")
52+
escaped_ver = VERSION.replace(r".", r"\.")
5353
COMMIT_HASH = subprocess.run(["git", "log", "--grep", escaped_ver, "--pretty=oneline"], capture_output=True, text=True).stdout.split()[0]
5454

5555
with open("build.json.in") as f:
@@ -87,7 +87,10 @@ for theme in THEMES:
8787
build_str = ["flatpak-builder", "builddir", "--install", "--user", "org.gtk.Gtk3theme.%s.json" % theme]
8888
print("\n\nBuilding:", build_str)
8989
print("\n")
90-
subprocess.run(build_str)
90+
cp = subprocess.run(build_str, text=True, capture_output=True)
91+
if cp.returncode != 0:
92+
print("Command returned non-0 for %s: %s" % (theme, str(cp.stderr)))
93+
quit()
9194
except CalledProcessError as e:
9295
print("Build error for %s: %s" % (theme, str(e)))
9396
quit()

0 commit comments

Comments
 (0)