@@ -9,8 +9,8 @@ import webbrowser
99import sys
1010from 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
1616TEST = input ("Build and install to test? y/n: " ) == "y"
@@ -49,7 +49,7 @@ THEMES = [
4949VERSION = 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 "\." )
5353COMMIT_HASH = subprocess .run (["git" , "log" , "--grep" , escaped_ver , "--pretty=oneline" ], capture_output = True , text = True ).stdout .split ()[0 ]
5454
5555with 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 \n Building:" , 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