Skip to content

Commit

Permalink
Release: 6.0.0rc0 (#846)
Browse files Browse the repository at this point in the history
* Add release date to changelog

* Add support for prerelease section in version

* Bump version for 6.0.0rc0 release

* Update release date
  • Loading branch information
mdickinson authored Jan 30, 2020
1 parent fe97046 commit d995370
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Traits CHANGELOG
Release 6.0.0rc0
----------------

Released: XXXX-XX-XX
Released: 2020-01-30

Release notes
~~~~~~~~~~~~~
Expand Down
19 changes: 14 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
MAJOR = 6
MINOR = 0
MICRO = 0
IS_RELEASED = False
PRERELEASE = "rc0"
IS_RELEASED = True

# If this file is part of a Git export (for example created with "git archive",
# or downloaded from GitHub), ARCHIVE_COMMIT_HASH gives the full hash of the
# commit that was exported.
ARCHIVE_COMMIT_HASH = "$Format:%H$"

# Templates for version strings.
RELEASED_VERSION = "{major}.{minor}.{micro}"
UNRELEASED_VERSION = "{major}.{minor}.{micro}.dev{dev}"
RELEASED_VERSION = "{major}.{minor}.{micro}{prerelease}"
UNRELEASED_VERSION = "{major}.{minor}.{micro}{prerelease}.dev{dev}"

# Paths to the autogenerated version file and the Git directory.
HERE = os.path.abspath(os.path.dirname(__file__))
Expand Down Expand Up @@ -171,7 +172,11 @@ def git_version():
git_count, git_revision = _git_info()
version_template = RELEASED_VERSION if IS_RELEASED else UNRELEASED_VERSION
version = version_template.format(
major=MAJOR, minor=MINOR, micro=MICRO, dev=git_count
major=MAJOR,
minor=MINOR,
micro=MICRO,
prerelease=PRERELEASE,
dev=git_count,
)
return version, git_revision

Expand All @@ -197,7 +202,11 @@ def archive_version():

version_template = RELEASED_VERSION if IS_RELEASED else UNRELEASED_VERSION
version = version_template.format(
major=MAJOR, minor=MINOR, micro=MICRO, dev="-unknown"
major=MAJOR,
minor=MINOR,
micro=MICRO,
prerelease=PRERELEASE,
dev="-unknown",
)
return version, ARCHIVE_COMMIT_HASH

Expand Down

0 comments on commit d995370

Please sign in to comment.