Miss any of our Open RFC calls?Watch the recordings here! »

@semabit/release-it-bumper

1.3.0 • Public • Published

Version read/write plugin for release-it

This plugin reads and/or writes version/manifest files.

# npm
npm install --save-dev @semabit/release-it-bumper

# yarn
yarn add --dev @semabit/release-it-bumper

In release-it config:

"plugins"{
  "@semabit/release-it-bumper": {
    "out": "manifest.json"
  }
}

for .yaml file:

"plugins"{
  "@semabit/release-it-bumper": {
    "out": { "file": "version.yaml", "type": "application/x-yaml" }
  }
}

In case the in option is used, the version from this file will take precedence over the version from package.json or the latest Git tag (which release-it uses by default).

The default type is application/json, but text/plain and application/x-yaml are also supported. In that case the whole file is used to read and/or write the version.

"plugins"{
  "@semabit/release-it-bumper": {
    "in": { "file": "VERSION", "type": "text/plain" },
    "out": { "file": "VERSION", "type": "text/plain" }
  }
}
"plugins"{
  "@semabit/release-it-bumper": {
    "in": { "file": "version.yaml", "type": "application/x-yaml" },
    "out": { "file": "version.yaml", "type": "application/x-yaml" }
  }
}

The out option can also be an array of files:

"plugins"{
  "@semabit/release-it-bumper": {
    "out": ["manifest.json", "bower.json", { "file": "version.yaml", "type": "application/x-yaml" }]
  }
}

The path option (default: "version") can be used to change a different property. the following example will set the deeper.current property to the new version in manifest.json. Also possible to define the path for yaml files:

"plugins"{
  "@semabit/release-it-bumper": {
    "out": [
      { "file": "manifest.json", "path": "deeper.current" },
      { "file": "version.yaml", "type": "application/x-yaml", "path": "parameters['app.version']" }
    ]
  }
}

Install

npm i @semabit/release-it-bumper

DownloadsWeekly Downloads

27

Version

1.3.0

License

UNLICENSED

Unpacked Size

19.1 kB

Total Files

9

Last publish

Collaborators

  • avatar