(releaseType = null)
| 450 | * @param {string} [releaseType] - "patch", "minor" or "major" to bump before releasing. |
| 451 | */ |
| 452 | export async function release(releaseType = null) { |
| 453 | task.stopOnFailures() |
| 454 | const packageInfo = JSON.parse(fs.readFileSync('package.json')) |
| 455 | if (releaseType) { |
| 456 | packageInfo.version = semver.inc(packageInfo.version, releaseType) |
| 457 | fs.writeFileSync('package.json', JSON.stringify(packageInfo)) |
| 458 | await shell`git add package.json` |
| 459 | await shell`git commit -m "version bump"` |
| 460 | } |
| 461 | const version = packageInfo.version |
| 462 | await docs() |
| 463 | await def() |
| 464 | await publishSite() |
| 465 | await shell`git pull` |
| 466 | await shell`git tag ${version}` |
| 467 | await shell`git push origin 3.x --tags` |
| 468 | await shell`rm -rf docs/wiki/.git` |
| 469 | await shell`npm publish` |
| 470 | say('-- RELEASED --') |
| 471 | } |
| 472 | |
| 473 | |
| 474 | /** |
nothing calls this directly
no test coverage detected