Find and bump version numbers within your app files.
To bump a file(s), you must add:
- A
tasks
object containingbump
array containing globs or files to copy.
Example from caddy.config.js
...
tasks : {
bump: ['package.json','README.md', '*/app.json'],
}
...
By default files are bumped with a 'patch'
- CLI:
caddy bump
- NodeJS:
caddy.bump(source-glob, options)
You can specify which, and how, a file is bumped by adding the file name and -patch
, -minor
, -major
, -prerelease
or even -v3.2.1
.
- CLI:
caddy bump package.json -major
- NodeJS:
caddy.bump(['package.json'], {type: 'major'})
- 'npm run bump'
- or 'npm run bump -- -major'
It is recommended you update your package.json scripts
object:
package.json
"scripts":{
"bump": "caddy bump"
}