You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/14 18:06:43 UTC

[cordova-windows] branch janpio-misc updated (30f09c9 -> e2673e7)

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

janpio pushed a change to branch janpio-misc
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git.


 discard 30f09c9  new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line
     new e2673e7  new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (30f09c9)
            \
             N -- N -- N   refs/heads/janpio-misc (e2673e7)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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:
 bin/lib/check_reqs.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-windows] 01/01: new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line

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

janpio pushed a commit to branch janpio-misc
in repository https://gitbox.apache.org/repos/asf/cordova-windows.git

commit e2673e70eaa308dcb11ff2675945b499b1076a52
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Wed Feb 14 18:54:27 2018 +0100

    new script `check_all` that does the same thing as `cordova requirements` but can be called from the command line
---
 bin/check_all         | 34 ++++++++++++++++++++++++++++++++++
 bin/check_all.bat     | 25 +++++++++++++++++++++++++
 bin/lib/check_reqs.js | 11 +++++++++--
 3 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/bin/check_all b/bin/check_all
new file mode 100644
index 0000000..84c9c97
--- /dev/null
+++ b/bin/check_all
@@ -0,0 +1,34 @@
+#!/usr/bin/env node
+
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+var check_reqs = require('./lib/check_reqs');
+
+// check for help flag
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    check_reqs.help();
+} else {
+  check_reqs.check_all().done(function success(result) {
+      console.log('check_all', result);
+  }, function (err) {
+      console.error('Error: ' + err);
+      process.exit(2);
+  });
+}
diff --git a/bin/check_all.bat b/bin/check_all.bat
new file mode 100644
index 0000000..4a7557d
--- /dev/null
+++ b/bin/check_all.bat
@@ -0,0 +1,25 @@
+:: Licensed to the Apache Software Foundation (ASF) under one
+:: or more contributor license agreements.  See the NOTICE file
+:: distributed with this work for additional information
+:: regarding copyright ownership.  The ASF licenses this file
+:: to you under the Apache License, Version 2.0 (the
+:: "License"); you may not use this file except in compliance
+:: with the License.  You may obtain a copy of the License at
+:: 
+:: http://www.apache.org/licenses/LICENSE-2.0
+:: 
+:: Unless required by applicable law or agreed to in writing,
+:: software distributed under the License is distributed on an
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+:: KIND, either express or implied.  See the License for the
+:: specific language governing permissions and limitations
+:: under the License
+@ECHO OFF
+SET script_path="%~dp0check_all"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'check_all' script in 'bin' folder, aborting...>&2
+    EXIT /B 1
+)
\ No newline at end of file
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index 99d0878..bd57bef 100644
--- a/bin/lib/check_reqs.js
+++ b/bin/lib/check_reqs.js
@@ -388,8 +388,15 @@ function getConfig () {
         config = config || new ConfigParser(path.join(__dirname, '../../config.xml'));
         return Q(config);
     } catch (e) {
-        return Q.reject(new CordovaError('Can\'t check requirements for Windows platform.' +
-            'The config.xml file is either missing or malformed.'));
+        // try again to cover case of being called from command line
+        try {
+            config = config || new ConfigParser(path.join(__dirname, '../../template/config.xml'));
+            return Q(config);
+        } catch (e) {
+            // yeah, really no config.xml
+            return Q.reject(new CordovaError('Can\'t check requirements for Windows platform.' +
+                'The config.xml file is either missing or malformed.'));
+        }
     }
 }
 

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org