Skip to content

Commit d995370

Browse files
authored
Release: 6.0.0rc0 (#846)
* Add release date to changelog * Add support for prerelease section in version * Bump version for 6.0.0rc0 release * Update release date
1 parent fe97046 commit d995370

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

CHANGES.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Traits CHANGELOG
44
Release 6.0.0rc0
55
----------------
66

7-
Released: XXXX-XX-XX
7+
Released: 2020-01-30
88

99
Release notes
1010
~~~~~~~~~~~~~

setup.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,17 @@
2222
MAJOR = 6
2323
MINOR = 0
2424
MICRO = 0
25-
IS_RELEASED = False
25+
PRERELEASE = "rc0"
26+
IS_RELEASED = True
2627

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

3233
# Templates for version strings.
33-
RELEASED_VERSION = "{major}.{minor}.{micro}"
34-
UNRELEASED_VERSION = "{major}.{minor}.{micro}.dev{dev}"
34+
RELEASED_VERSION = "{major}.{minor}.{micro}{prerelease}"
35+
UNRELEASED_VERSION = "{major}.{minor}.{micro}{prerelease}.dev{dev}"
3536

3637
# Paths to the autogenerated version file and the Git directory.
3738
HERE = os.path.abspath(os.path.dirname(__file__))
@@ -171,7 +172,11 @@ def git_version():
171172
git_count, git_revision = _git_info()
172173
version_template = RELEASED_VERSION if IS_RELEASED else UNRELEASED_VERSION
173174
version = version_template.format(
174-
major=MAJOR, minor=MINOR, micro=MICRO, dev=git_count
175+
major=MAJOR,
176+
minor=MINOR,
177+
micro=MICRO,
178+
prerelease=PRERELEASE,
179+
dev=git_count,
175180
)
176181
return version, git_revision
177182

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

198203
version_template = RELEASED_VERSION if IS_RELEASED else UNRELEASED_VERSION
199204
version = version_template.format(
200-
major=MAJOR, minor=MINOR, micro=MICRO, dev="-unknown"
205+
major=MAJOR,
206+
minor=MINOR,
207+
micro=MICRO,
208+
prerelease=PRERELEASE,
209+
dev="-unknown",
201210
)
202211
return version, ARCHIVE_COMMIT_HASH
203212

0 commit comments

Comments
 (0)