-
-
Notifications
You must be signed in to change notification settings - Fork 26
Versioning in poppr
Versions in poppr are derived from the concept of semantic versioning where there are three numbers on the
released version indicating <major>.<minor>.<patch>
. On github, poppr is in
development. The github version of poppr always has a x.y.z.99.c
syntax. c
is a number indicating the number of commits that the current version is ahead of
the release version. For example:
1.1.2.99.40
is 40 commits ahead of version 1.1.2.
This version is automatically incremented with a special git command detailed below.
The stable development version of poppr (ie. the one that contains minor improvements and bug fixes) lives on the master
branch of the github repository.
The development version refers to a branch where major improvements are being tested. The branch where this version lives is called devel
.
The version should be automatically incremented before you push to the remote repository. Obviously, since this is based on git, you should have that installed. In your home directory, there should be a file called .gitconfig
. This file contains configurations for your copy of git. At the end of this file, place these two lines.
[alias]
pupdate = "!make update && git add . && git commit --amend --no-edit"
This will give you a quick git command to update the poppr version before you push (pupdate == "poppr update"). When you've made all your changes, type the following before you push to your remote.
git commit -a -m "insert your commit message here"
git pupdate
This will update the DESCRIPTION
file and the vignette files with the correct version number and then append the most recent commit. The script to automatically update based on the number of commits is based on this stackoverflow answer.
This must be done manually. The way to do this is to use git tag
as this becomes the basis for all subsequent versions. IMPORTANT: you must have it in the syntax "v.X.Y.X".
Step 1: Change the NEWS file to reflect the changes and commit.
git commit -a -m "update NEWS"
Step 2: tag, update, and push.
git tag -a v.X.Y.Z -m "poppr version X.Y.Z" # Add a tag so pupdate can make changes
git pupdate # This will change all the documentation to X.Y.Z
git tag -d v.X.Y.Z # remove the tag because it's no longer associated with the commit
git tag -a v.X.Y.Z -m "poppr version X.Y.Z" # add the tag again.
git push
git push origin --tags