New releases are built and uploaded to
Anaconda.org whenever a new tag
that starts with the letter v
is
created and pushed to
GitHub. As an example, the following
will cause a new release to be built:
$ git tag v0.1.1 # Create the tag locally
$ git push --tags # Push the tag to the remote
A new release is created (v0.1.1
) and the tag pushed to GitHub.
Travis-CI notices the tagged commit,
and after building and testing the package, creates a fresh new package that
is uploaded to Anaconda.org.
Note
Although you can create such a tag on any branch, releases should only
come from the release
branch. Make sure that when you create a tag
you are doing so on release
(and all your changes are committed).
A couple notes about creating a new version:
Landlab follows Semantic Versioning rules for version assignment and formatting. Please stick to them.
The version given in the tag name must match that in
landlab/__init__.py
. The version must also be changed in
.conda-recipe/meta.yaml
. However, meta.yaml
doesn’t like dashes
so if your version contains a dash just leave it out in this file
(for example 1.0.0-beta.6
becomes 1.0.0beta.6
).
If you mess up (forget to update all the version strings scattered throughout the code, for example), you can always delete the tag and recreate it. To do this, you’ll need to delete both the remote tag and the local tag.
$ git push --delete origin <tagname> # Delete the tag on the remote repository
$ git tag --delete <tagname> # Delete the tag from the local repository
where <tagname>
is the name of your tag (v0.1.1
, for example).
If your new tag was successfully pushed to GitHub, you will be able to see it with the rest of the releases and tags.
To see if your new release was created successfully, you can do one or all of the following:
conda search landlab -c landlab
. See theconda docs for a description of
conda
and how to use it, or you can always useconda -h
from the command line.
Make sure you are on the release
branch.
$ git checkout release
Make sure all the version strings match and use Semantic Versioning.
landlab/__init__.py
.conda-recipe/meta.yaml
Commit your changes.
Create a tag for this release that matches the string in __init__.py
but that starts with the letter v
.
$ git tag v0.1.1
Push your tag to the remote.
$ git push --tags