You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2020/07/02 12:38:04 UTC

[sling-slingpackager] branch master updated (d4d9afd -> 1219ec0)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingpackager.git.


    from d4d9afd  Tweak README
     new bcfe024  Ignore node_modules folder.
     new 1219ec0  SLING-9558 - Fixed broken --install option with upload command.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                |  2 ++
 utils/composumpackager.js | 23 +++++++++++++----------
 2 files changed, 15 insertions(+), 10 deletions(-)


[sling-slingpackager] 01/02: Ignore node_modules folder.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingpackager.git

commit bcfe0249469e57119f162234938a76a8bde3e180
Author: Henry Saginor <hs...@gmail.com>
AuthorDate: Fri Jun 26 13:32:56 2020 -0700

    Ignore node_modules folder.
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index f169b97..2ac76e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 !/bin/
+
+**/node_modules
\ No newline at end of file


[sling-slingpackager] 02/02: SLING-9558 - Fixed broken --install option with upload command.

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-slingpackager.git

commit 1219ec03bff8b066f3799fc5279d2637d6e07086
Author: Henry Saginor <hs...@gmail.com>
AuthorDate: Fri Jun 26 16:51:43 2020 -0700

    SLING-9558 - Fixed broken --install option with upload command.
---
 utils/composumpackager.js | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/utils/composumpackager.js b/utils/composumpackager.js
index 67322d3..bec3062 100644
--- a/utils/composumpackager.js
+++ b/utils/composumpackager.js
@@ -60,7 +60,6 @@ const upload = (url, username, password, packagePath, install, maxRetry) => {
             logger.debug(JSON.stringify(json));
 
             if(install) {
-                logger.info('installing', json.path);
                 installPackage(url, username, password, json.path, maxRetry);
             }
         }
@@ -90,15 +89,7 @@ const deletePackage = (url, username, password, package, maxRetry) => {
 }
 
 const install = (url, username, password, package, maxRetry) => {
-    logger.log('Installing package', package, 'on', url);
-
-    let post = postJob({url, username, password, package, maxRetry}, 'install', (error, result) => {
-        if(error) {
-            logger.error('Unable to uninstall package', package);
-            logger.error(error);
-            process.exit(1);
-        } 
-    });
+    installPackage(url, username, password, package, maxRetry);
 }
 
 const uninstall = (url, username, password, package, maxRetry) => {
@@ -145,6 +136,18 @@ const getName = () => {
     return 'Composum Package Manager';
 }
 
+function installPackage(url, username, password, package, maxRetry) {
+    logger.log('Installing package', package, 'on', url);
+
+    let post = postJob({url, username, password, package, maxRetry}, 'install', (error, result) => {
+        if(error) {
+            logger.error('Unable to uninstall package', package);
+            logger.error(error);
+            process.exit(1);
+        } 
+    });
+}
+
 function downloadPackage(data) {
     if(data.filePath) {
         data.serviceURL = data.url + "/bin/cpm/package.download.zip" + data.package;