From 35427ed4f176a63d916435141fbb30e12264cbfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 10 Apr 2020 21:05:11 +0200 Subject: [PATCH] build: Use gnome-extensions-tool for zipping up The tool has a dedicated command for creating an extension bundle. It knows how to handle translations and GSettings schemas, so we don't have to. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/114 --- export-zips.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/export-zips.sh b/export-zips.sh index 7fd4f038..be55d5dc 100755 --- a/export-zips.sh +++ b/export-zips.sh @@ -22,15 +22,12 @@ for f in $extensiondir/*; do schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml cp $srcdir/NEWS $srcdir/COPYING $f - cp -r $localedir $f + sources=(NEWS COPYING $(cd $f; ls *.js)) - if [ -f $schema ]; then - mkdir $f/schemas - cp $schema $f/schemas; - glib-compile-schemas $f/schemas - fi + [ -f $schema ] || unset schema - (cd $f && zip -rmq $srcdir/zip-files/$uuid.shell-extension.zip .) + gnome-extensions pack ${sources[@]/#/--extra-source=} --podir=$srcdir/po \ + ${schema:+--schema=$schema} --out-dir=$srcdir/zip-files $f done rm -rf $builddir