Skip to content

AtelierArith/PkgBump.jl

Repository files navigation

PkgBump Build Status Stable Dev

PkgBump.jl

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.

How to Use

Installing PkgBump.jl in a Shared Environment

$ git clone https://github.com/AtelierArith/PkgBump.jl
$ ls
PkgBump.jl
$ julia -e 'using Pkg; Pkg.activate(); Pkg.develop(path="PkgBump.jl")'

Updating Your Julia Project File

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.

References

About

Automatically increment Julia Project file version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published