Updraft is a generic command-line tool that prepares a repository for an upcoming release by updating changelogs and bumping version numbers in package.json
files.
It saves the changes to the files, but it does not make any Git commits or GitHub releases. You can automate these things in your CI/CD pipeline or do them manually after running the Updraft tool.
Supported file formats:
-
AsciiDoc-based changelogs (
*.adoc
) in Keep a Changelog format. -
package.json
files.
updraft --files <glob patterns> --release-version <major.minor.patch[-prerelease][+buildinfo]>
-
Install the
@rainstormy/updraft
package locally in your project:npm install --save-dev @rainstormy/updraft
pnpm install --save-dev @rainstormy/updraft
yarn add --dev @rainstormy/updraft
-
Define a package script to run the program, for example with a constant set of files and a variable release version:
"scripts": { "release.prepare": "updraft --files CHANGELOG.adoc packages/**/package.json --release-version" },
-
Run the package script from the project root directory and supply the necessary arguments, for example:
npm run release.prepare -- 1.1.0
pnpm run release.prepare 1.1.0
yarn run release.prepare 1.1.0
This approach is faster and more reliable in the long run than downloading and running Updraft in a temporary environment for every release of your project.
-
If you don’t want to define a package script, you can also run the locally installed tool directly, for example:
npm exec updraft -- --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
pnpm exec updraft --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
yarn run updraft --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
-
Download and run the
@rainstormy/updraft
package in a temporary environment without installing it as a dependency to your project, for example:npx @rainstormy/updraft --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
pnpm dlx @rainstormy/updraft --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
yarn dlx @rainstormy/updraft --files CHANGELOG.adoc packages/**/package.json --release-version 1.1.0
Contributions to this project are welcome! Please take a look at CONTRIBUTING.adoc 😀