cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cordova-cli] infacto edited a comment on issue #528: Pass app id, name and version to build command.
Date Wed, 02 Sep 2020 04:29:42 GMT

infacto edited a comment on issue #528:
URL: https://github.com/apache/cordova-cli/issues/528#issuecomment-685285186


   Ok [seymour](https://github.com/dpogue/seymour) works now for me. Because I call it directly
in a NodeJS script, instead of using env vars and call via CLI.
   
   **build.js**
   
   ```js
   const seymour = require('seymour');
   
   seymour([], {
     SEY_APP_NAME: 'MyApp',
     SEY_APP_ID: 'com.my.app',
     SEY_APP_VERSION: '1.2.3',
     SEY_BUILD_TYPE: 'release'
   });
   ```
   
   Call: `node build.js`.
   It's optimal for me, because I use the app metadata from a custom json file. For me it's
better than env vars. 
   But, this solution is like my solution. My solution is to parse and write xml via JavaScript.

   Seymour also changes the `config.xml` file. I wanted to avoid that. ... I hope for a solution
to pass arguments to the cli or use a temporary file for this. Cordova could check if a file
exists to overwrite the some data of config.xml. Or the CLI arguments solution. 🤔 Which
Cordova repo is the right one for this?
   
   Again the current workaround is to change the `config.xml`. Either with seymour or an own
solution. My solution is to use `fast-xml-parser`, replace the json data and write the config.xml
again. There is currently no solution to set parameters on the fly.
   I'll see if I use seymour or my own solution (less dependencies). But I would prefer an
official solution without changing the config.xml.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


Mime
View raw message