[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1536-g32760ab

Franck Villaume nerville at libremir.placard.fr.eu.org
Tue Mar 14 23:00:32 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  32760abccd663348c55ae44bc55434ad780d6f58 (commit)
      from  e2683db364577b7e3f0b66ec02123e16bbc5c60f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=32760abccd663348c55ae44bc55434ad780d6f58

commit 32760abccd663348c55ae44bc55434ad780d6f58
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Tue Mar 14 23:00:10 2017 +0100

    forge cli: implement releaseDump

diff --git a/src/bin/forge b/src/bin/forge
index 8629aa4..20a5fcc 100755
--- a/src/bin/forge
+++ b/src/bin/forge
@@ -466,6 +466,32 @@ class CliActions {
 		return $packageDump;
 	}
 
+	function releaseDump($releaseid, $params = array('setup', 'json')) {
+		$releaseDump['id'] = $releaseid;
+		$release = frsrelease_get_object($releaseid);
+		if ($release && is_object($release) && !$release->isError()) {
+			switch($params[0]) {
+				case 'all':
+					unset($release->FRSPackage);
+					$releaseDump['setup'] = $release;
+				case 'data':
+					break;
+				case 'setup':
+					unset($release->FRSPackage);
+					$releaseDump['setup'] = $release;
+					break;
+				default:
+					$releaseDump['error'][] = _('Unknown function');
+					break;
+			}
+		} else {
+			$releaseDump['error'][] = _('Unable to get release id')._(': ').$releaseid;
+		}
+		ksort($releaseDump);
+		$this->print_result($releaseDump, $params);
+		return $releaseDump;
+	}
+
 	function print_result($arrayDump, $params) {
 		if (isset($params[1])) {
 			if (in_array($params[1], array('json', 'raw', 'return'))) {

-----------------------------------------------------------------------

Summary of changes:
 src/bin/forge | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list