[pitivi] flatpak: Rename the .desktop file only when needed



commit 21a2b6c83a65cbd6ccc16141c217b8a42b087c9a
Author: Thibault Saunier <tsaunier gnome org>
Date:   Thu Jun 23 17:35:07 2016 -0400

    flatpak: Rename the .desktop file only when needed
    
    Meaning not for the latest stable release

 build/flatpak/json-template-expander |   10 +++++++++-
 build/flatpak/pitivi-flatpak         |    2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/build/flatpak/json-template-expander b/build/flatpak/json-template-expander
index a88c609..dde85fd 100755
--- a/build/flatpak/json-template-expander
+++ b/build/flatpak/json-template-expander
@@ -8,14 +8,22 @@ import sys
 
 if __name__ == "__main__":
     if len(sys.argv) != 5:
-        print("call with: %s <template_file> <outfile> <basedir> <gst-version> " %
+        print("call with: %s <template_file> <outfile> <basedir> <gst-version> <branchname>" %
               sys.argv[0])
 
     basedir = sys.argv[3]
     gst_version = sys.argv[4]
+    branchname = sys.argv[5]
     with open(sys.argv[1], "r") as tf:
         template = json.load(tf)
 
+    if branchname == "stable":
+        del template["desktop-file-name-prefix"]
+    elif branchname == "master":
+        template["desktop-file-name-prefix"] = "(Rolling)"
+    else:
+        template["desktop-file-name-prefix"] = branchname
+
     print("-> Generating %s against GStreamer %s" % (sys.argv[2], gst_version))
 
     for module in template["modules"]:
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index fe37d58..0dbb82f 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -372,7 +372,7 @@ then
   then
     # Update values in the json template
     JSON=$SCRIPTDIR/$APP_BUILD_NAME.json
-    $SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH 
$GST_VERSION
+    $SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH 
$GST_VERSION $BRANCH
 
     echo "-> Removing prefix $PREFIX"
     rm -Rf $PREFIX


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]