[pitivi] flatpak: Add parametters to set ostree commit message



commit 150a4e4cd89aa58133593ab132d993f8ba20e379
Author: Thibault Saunier <tsaunier gnome org>
Date:   Tue May 31 20:00:40 2016 -0400

    flatpak: Add parametters to set ostree commit message

 build/flatpak/pitivi-flatpak |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/build/flatpak/pitivi-flatpak b/build/flatpak/pitivi-flatpak
index 8ab6cca..ce57f0f 100755
--- a/build/flatpak/pitivi-flatpak
+++ b/build/flatpak/pitivi-flatpak
@@ -105,6 +105,8 @@ Options:
   -b=, --branch=:    The flatpak branch to use (0.95, master...)
   -c,  --clean:      Clean previous builds and restart from scratch
        --use-remote: Build from the official repository (master branch)
+       --repo-commit-subject: The commit subject to be used when updating the ostree repository
+       --repo-commit-body: The commit body to be used when updating the ostree repository
 
 You can find more information about flatpak at: https://wiki.gnome.org/Projects/SandboxedApps
 "
@@ -148,6 +150,14 @@ do
     USE_REMOTE=true
     shift
     ;;
+    --repo-commit-subject=*)
+    COMMIT_SUBJECT="${i#*=}"
+    shift
+    ;;
+    --repo-commit-body=*)
+    COMMIT_BODY="${i#*=}"
+    shift
+    ;;
   esac
 done
 
@@ -282,7 +292,7 @@ fi
 
 if [ -n "$BUNDLE" ]
 then
-  PREFIX=$FLATPAK_ENVPATH/$APP_BUILD_NAME/
+  PREFIX="$FLATPAK_ENVPATH/$APP_BUILD_NAME-prefix/"
 else
   PREFIX=$FLATPAK_ENVPATH/prefix
 fi
@@ -348,7 +358,7 @@ then
     JSON=$SCRIPTDIR/$APP_BUILD_NAME.json
     $SCRIPTDIR/json-template-expander $SCRIPTDIR/$APPLICATION_NAME.template.json $JSON $LOCAL_REPOS_PATH
 
-    echo "-> Removing $PREFIX"
+    echo "-> Removing prefix $PREFIX"
     rm -Rf $PREFIX
 
     XDG_APP_BUILD_OPTIONS=""
@@ -395,8 +405,13 @@ then
   echo "-> Creating repository $REPO if needed"
   mkdir -p $REPO
 
-  echo "Exporting repo $REPO $DEVELOPMENT_BRANCHNAME"
-  $FLATPAK build-export $REPO $PREFIX $DEVELOPMENT_BRANCHNAME || exit 1
+  if [ -z "$COMMIT_SUBJECT" ]
+  then
+      COMMIT_SUBJECT="Updating $APPLICATION_REF_NAME"
+  fi
+
+  echo "-> Exporting repo $REPO $DEVELOPMENT_BRANCHNAME (args: --body="$COMMIT_BODY" 
--subject="$COMMIT_SUBJECT")"
+  $FLATPAK build-export --body="$COMMIT_BODY" --subject="$COMMIT_SUBJECT" $REPO $PREFIX 
$DEVELOPMENT_BRANCHNAME || exit 1
 
   echo "Updating repo $REPO"
   $FLATPAK build-update-repo --generate-static-deltas $REPO || exit 1


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