main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
464 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | const SemVer = require('../classes/semver')
|
---|
| 2 |
|
---|
| 3 | const inc = (version, release, options, identifier, identifierBase) => {
|
---|
| 4 | if (typeof (options) === 'string') {
|
---|
| 5 | identifierBase = identifier
|
---|
| 6 | identifier = options
|
---|
| 7 | options = undefined
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | try {
|
---|
| 11 | return new SemVer(
|
---|
| 12 | version instanceof SemVer ? version.version : version,
|
---|
| 13 | options
|
---|
| 14 | ).inc(release, identifier, identifierBase).version
|
---|
| 15 | } catch (er) {
|
---|
| 16 | return null
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
| 19 | module.exports = inc
|
---|
Note:
See
TracBrowser
for help on using the repository browser.