Automatically increments the version in a Julia Project file. Package developers only have to run one of the three functions:
# Roughly speaking
bumppatch: v"x.y.z" -> v"x.y.(z+1)"
bumpminor: v"x.y.z" -> v"x.(y+1).0"
bumpmajor: v"x.y.z" -> v"(x+1).0.0"
Internally, we use the Base.nextpatch
, Base.nextminor
, Base.nextmajor
functions respectively.
$ git clone https://github.com/AtelierArith/PkgBump.jl
$ ls
PkgBump.jl
$ julia -e 'using Pkg; Pkg.activate(); Pkg.develop(path="PkgBump.jl")'
To create a release for MyPkg.jl
located at path/to/your/MyPkg.jl
, execute the following commands:
$ cd path/to/your/MyPkg.jl
$ ls # Verify the presence of Project.toml or JuliaProject.toml
Output: Project.toml src test ...
$ julia --project -e 'using PkgBump; PkgBump.bumppatch()'
This command updates the Julia project file (Project.toml
or JuliaProject.toml
), commits the changes, and pushes them to a remote repository named pkgbump/bump-to-version-$(new_version)
, where new_version
is the next patch version of the current version of MyPkg.jl
. Note that there are other options such as bumpminor
and bumpmajor
.