SCV-CLI

Build Status NPM Version NPM Downloads dependencies Status Known Vulnerabilities JavaScript Style Guide

Command line interface to set the version number of a Apache Cordova application for iOS and Android.

Installing

npm install -g scv-cli

# or if you just want to use it locally
npx scv-cli -v 1.4.5 -b 445

Note: For a global install of -g scv-cli, OSX/Linux users may need to prefix the command with sudo or can setup proper file permissions on OSX for npm to install without sudo.

Usage:

Command Line

scv [options] -v <version> -b <build>

Example:

scv -v 1.4.5 -b 445

Command-line flags/options:

-V, --version           output the version number
-v, --semver <version>  Version number to be set.
-b, --build <build>     Build number to be set.
-c, --config <config>   Location of config.xml (e.g. /path/to/config.xml). Defaults to ./config.xml.
-h, --help              output usage information

Library

Example:

// CJS
const { SCV } = require('scv-cli')
// or MJS
import * as SCVClass from 'scv-cli'
const { SCV } = SCVClass.default


const scv = new SCV({
  showLogs: true
})
scv
  .setVersion(version, build, configFile)
  .then(res => {
    // do something
  })
  .catch(err => {
    // handle error
  })