From 967d7cc33374d6c979bfa498ca41e372c8826f85 Mon Sep 17 00:00:00 2001 From: Greg Elin Date: Tue, 22 Jun 2021 07:59:07 -0500 Subject: [PATCH 1/5] Append '-dev' to version number --- CHANGELOG.md | 4 ++-- VERSION | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5c16f0f..486e3bf24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ GovReady-Q Release Notes ======================== -v999 (June XX, 2021) ---------------------- +v0.9.5-dev (June XX, 2021) +-------------------------- **Feature changes** diff --git a/VERSION b/VERSION index 030caf2c1..3256dd1f4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v999 \ No newline at end of file +v0.9.5-dev From 2181e214878ba68d73d2d25d94d1377ad8999000 Mon Sep 17 00:00:00 2001 From: Greg Elin Date: Wed, 23 Jun 2021 07:07:36 -0500 Subject: [PATCH 2/5] Updating regex --- .circleci/check_version_file.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/check_version_file.py b/.circleci/check_version_file.py index e52d12945..19dfda474 100644 --- a/.circleci/check_version_file.py +++ b/.circleci/check_version_file.py @@ -24,13 +24,17 @@ # v999 or v.999 indicates a development build DEVEL_BUILD = True + if re.match(r"^(v\S+-dev) \(.*", line): + # v0.9.5-dev indicates a development build + 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) @@ -52,6 +56,9 @@ elif DEVEL_BUILD and str(v) != "999": 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) +elif DEVEL_BUILD and str(v) != "999": + 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 From b83bcff91567fd07c4e91e8d3c4c6c98e5749900 Mon Sep 17 00:00:00 2001 From: davidpofo Date: Fri, 2 Jul 2021 10:14:17 -0400 Subject: [PATCH 3/5] testing parse for version --- .circleci/check_version_file.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.circleci/check_version_file.py b/.circleci/check_version_file.py index 19dfda474..f5eec1983 100644 --- a/.circleci/check_version_file.py +++ b/.circleci/check_version_file.py @@ -20,22 +20,20 @@ DEVEL_BUILD = False with open("CHANGELOG.md") as f: for line in f: - if re.match(r"^v.?999", line): + if re.match(r"^v.?999", line) or re.match(r"^(v\S+-dev) \(.*", line) or re.match(r"^-+\s*$", line) or v.is_devrelease: # v999 or v.999 indicates a development build DEVEL_BUILD = True - - if re.match(r"^(v\S+-dev) \(.*", line): - # v0.9.5-dev indicates a development build - 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 + print("999") + print(re.match(r"^v.?999", line) ) + print("-dev") + print(re.match(r"^(v\S+-dev) \(.*", line) ) + print("other check") + print(re.match(r"^-+\s*$", line) ) m = re.match(r"^(v\S+-dev) \(.*|^(v\S+) \(.*", line) - + print(m) + n = re.match(r"^(v\S+) \(.*", line) + print(n) if m: CURRENT_VERSION = m.group(1) break @@ -50,13 +48,10 @@ 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": - 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) -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) From 093b195ed87e80d9d76288939e9628bd679daf69 Mon Sep 17 00:00:00 2001 From: davidpofo Date: Fri, 2 Jul 2021 10:19:07 -0400 Subject: [PATCH 4/5] is_prerelease not dev release --- .circleci/check_version_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/check_version_file.py b/.circleci/check_version_file.py index f5eec1983..0be2fa61c 100644 --- a/.circleci/check_version_file.py +++ b/.circleci/check_version_file.py @@ -20,7 +20,7 @@ DEVEL_BUILD = False with open("CHANGELOG.md") as f: for line in f: - if re.match(r"^v.?999", line) or re.match(r"^(v\S+-dev) \(.*", line) or re.match(r"^-+\s*$", line) or v.is_devrelease: + if re.match(r"^v.?999", line) or re.match(r"^(v\S+-dev) \(.*", line) or re.match(r"^-+\s*$", line) or v.is_prerelease: # v999 or v.999 indicates a development build DEVEL_BUILD = True print("999") From c24b385eacfef2205063d57b50366ac8aa60a6ec Mon Sep 17 00:00:00 2001 From: davidpofo Date: Fri, 2 Jul 2021 10:24:26 -0400 Subject: [PATCH 5/5] using is_prerelease works for checking dev --- .circleci/check_version_file.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/.circleci/check_version_file.py b/.circleci/check_version_file.py index 0be2fa61c..cc7bd72fd 100644 --- a/.circleci/check_version_file.py +++ b/.circleci/check_version_file.py @@ -20,20 +20,10 @@ DEVEL_BUILD = False with open("CHANGELOG.md") as f: for line in f: - if re.match(r"^v.?999", line) or re.match(r"^(v\S+-dev) \(.*", line) or re.match(r"^-+\s*$", line) or v.is_prerelease: - # 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 - print("999") - print(re.match(r"^v.?999", line) ) - print("-dev") - print(re.match(r"^(v\S+-dev) \(.*", line) ) - print("other check") - print(re.match(r"^-+\s*$", line) ) m = re.match(r"^(v\S+-dev) \(.*|^(v\S+) \(.*", line) - print(m) - n = re.match(r"^(v\S+) \(.*", line) - print(n) if m: CURRENT_VERSION = m.group(1) break @@ -54,11 +44,3 @@ 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) -"""