Skip to content

Commit

Permalink
Merge pull request #1639 from GovReady/ge/version-dev-test
Browse files Browse the repository at this point in the history
Append '-dev' to version number
  • Loading branch information
davidpofo committed Jul 2, 2021
2 parents 7ae7ab2 + d05a433 commit a03ec87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
24 changes: 4 additions & 20 deletions .circleci/check_version_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,10 @@
DEVEL_BUILD = False
with open("CHANGELOG.md") as f:
for line in f:
if re.match(r"^v.?999", line):
# v999 or v.999 indicates a development build
if re.match(r"^(v\S+-dev) \(.*", line) or re.match(r"^-+\s*$", line) or v.is_prerelease:
DEVEL_BUILD = True

elif re.match(r"^-+\s*$", line):
# A heading before a version number usually is for
# "In Development" and indicates this is a development
# build as well
DEVEL_BUILD = True

m = re.match(r"^(v\S+) \(.*", line)

m = re.match(r"^(v\S+-dev) \(.*|^(v\S+) \(.*", line)
if m:
CURRENT_VERSION = m.group(1)
break
Expand All @@ -46,17 +38,9 @@
sys.exit(1)

# check to ensure that if either the CHANGELOG or VERSION indicates a development build, the other does so as well
if not DEVEL_BUILD and str(v) == "999":
if not DEVEL_BUILD and v.is_prerelease:
print("The VERSION file indicates a development build version of {}, while the CHANGELOG does not, indicating a version of {}.".format(VERSION, CURRENT_VERSION))
sys.exit(1)
elif DEVEL_BUILD and str(v) != "999":
elif DEVEL_BUILD and not v.is_prerelease:
print("The VERSION file does not indicate a development build, with a version of {}, while the CHANGELOG does indicate a development build, with a version of {}.".format(VERSION, CURRENT_VERSION))
sys.exit(1)

# the following block looks for devel to indicate a development build, but we are moving to the 999
# indicator. keeping for the ability to revert if necessary
"""
if DEVEL_BUILD and v.local != "devel":
print("ERROR: CHANGELOG has content before a version heading while VERSION file does not include '+devel'. For version releases, VERSION should not include '+devel' and no information should come before the version heading in CHANGELOG. Alternatively, the version number {} should end with +devel to signal that this is a development build.".format(repr(VERSION)))
sys.exit(1)
"""
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ GovReady-Q Release Notes
========================

v0.9.6-dev (June XX, 2021)

--------------------------

**UI changes**
Expand Down
3 changes: 2 additions & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
v0.9.6-dev
v0.9.6-dev

0 comments on commit a03ec87

Please sign in to comment.