runas-json-setversion

    1.0.2 • Public • Published

    Main Index:

    Available Commands:

    STEPS

    cordova-plugin::setVersion (Write version on project json file)

    [Index]

    Description

    Write version on json files in this.params.jsonFiles (bower.json, package.json,...) according GitFlow terms.

    Parameters

    • --jsonFiles: [Array], default: ['bower.json', 'package.json'] : Sets json files to search in order to be changed
    • --versionDescription: [String], default: 'chore(): change version file:' : Commentary displayed on commit when files change.
    • --versionStrategies: [Object], default: see version strategies section

    Version Strategies

    This parameter configure all the behaviour of this step.

    Default:

      "versionStrategies": {
        "finish" : {
          "feature": ["prerelease", "beta"],
          "merger": ["prerelease", "beta"],
          "release": ["auto", ""],
          "hotfix": ["remove", "hotfix"]
        },
        "start" : {
          "feature": ["prerelease", "alpha"],
          "merger": ["prerelease", "aam"],
          "release": ["prerelease", "rc"],
          "hotfix": ["#prehotfix", "hotfix"]
        }
      }
    

    Flow name: (First level object)

    Default are "finish" or "start". Is the name of the flow that the step is included. If this step is included inside other flows nothing is going to happen and the step will ends ok

    Branch name: (Second level object)

    Default are "feature", "merger", "release", "hotfix". The name of the branch where the step is executed. If the branch is different of any configured one nothing happen and the step will ends ok

    Version Strategy: (Third level object an Array)

    Default in the first occurrence is ["prerelease", "beta"].

    1. First element in array is the strategy that is going to be apply when the step in the flow/branch is executed. If the strategy is not valid and error will be thrown.
    2. Second element in array is the prereleaseTag to be append at the end of the version. (f.i. -beta, -alpha, ...)

    Semver strategies

    All strategies of inc function of this module: https://www.npmjs.com/package/semver

    (major, premajor, minor, preminor, patch, prepatch, or prerelease)

    Custom Strategies (begins with #)

    Execute a function inside this step, at the moment there is only one custom strategy:

    prehotfix: Like prerelease but never change patch/minor/major

    "auto" Strategy

    Search for the last tag and calculate strategy between the actual version.

    "remove" Strategy

    Only remove prereleaseTag

    PLUGINS

    Install

    npm i runas-json-setversion

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    ISC

    Unpacked Size

    121 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar