PkgBump.jl
Currently this project is WIP.
Introduction
When it comes to release new version of your package, you are supposed to update version entry Project.toml.
name = "YourJuliaPkg"
version = "0.1.0" # <---
...
...
I’m not sure how package developer update this file, but it would be nice to update, commit and push changes automatically.
PkgBump.jl
To do this, PkgBump.jl is created. You can install PkgBump.jl by executing the following commands:
$ git clone https://github.com/AtelierArith/PkgBump.jl
$ ls
PkgBump.jl
$ julia -e 'using Pkg; Pkg.activate(); Pkg.develop(path="PkgBump.jl")'
Currently, PkgBump.jl exports three functions named bumppatch, bumpminor and bumpmajor.
If you want to update version from 0.1.0 to 0.1.1, use bumppatch:
$ cd path/to/YourJuliaPkg.jl
$ julia --project -q
julia> using PkgBump
julia> pkgbump(; commit=false, push=false)
You’ll see your Project.toml or JuliaProject.toml is updated.
Note that, by default, keyword arguments are set to commit=true and push=true, which means you can commit and push changes to remote repository on the branch in the form of pkgbump/bump-to-version-$(new_version).
Now we only have to create a PR on GitHub or MR on GitLab and merge the branch into the default branch. Finally, call @juliaregister to register your new version of package in General registry.
Do you like PkgBump.jl?