Skip to content

Commit 2591d80

Browse files
authored
Prepare next release iteration (gcovr#747)
* Do not scrub version because this makes it hard to bump the version for the next release. * Add SOURCE_DATE_EPOCH environment variable to test execution. Environment variable is set to the date of the execution of `bump_version.py` * Add nox session to bump new version. * Bump version 6.0+master. * Print full version to HTML report.
1 parent 1221ef6 commit 2591d80

File tree

1,098 files changed

+2679
-22360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,098 files changed

+2679
-22360
lines changed

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
echo "EXTRA_CHECKLIST_ARGS=--no-verify-tags --no-verify-docs-next-version" >> $GITHUB_ENV
2727
- name: Run release_checklist
2828
run: |
29-
admin/release_checklist $EXTRA_CHECKLIST_ARGS 6.0
29+
admin/release_checklist $EXTRA_CHECKLIST_ARGS 6.0+master
3030
3131
deploy:
3232
runs-on: ubuntu-20.04

CHANGELOG.rst

+17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
.. program is needed to resolve option links
44
.. program:: gcovr
55

6+
Next Release
7+
------------
8+
9+
Known bugs:
10+
11+
Breaking changes:
12+
13+
New features and notable changes:
14+
15+
Bug fixes and small improvements:
16+
17+
Documentation:
18+
19+
Internal changes:
20+
21+
- Do not scrub versions in reference data. (:issue:`747`)
22+
623
6.0 (08 March 2023)
724
-------------------
825

admin/bump_version.py

+27-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# ************************** Copyrights and license ***************************
66
#
7-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
7+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
88
# https://gcovr.com/en/stable
99
#
1010
# _____________________________________________________________________________
@@ -147,7 +147,7 @@ def updateCallOfReleaseChecklist(filename: str, lines: List[str]):
147147
callFound = False
148148
for line in lines:
149149
if callReleaseChecklist in line:
150-
line = re.sub(r"\d+\.\d+$", VERSION, line)
150+
line = re.sub(r"\d+\.\d+(?:\+master)?$", VERSION, line)
151151
callFound = True
152152
newLines.append(line)
153153
if not callFound:
@@ -212,7 +212,7 @@ def updateReadme(filename: str, lines: List[str]):
212212
return newLines
213213

214214

215-
def updatDocumentation(filename: str, lines: List[str]):
215+
def updateDocumentation(filename: str, lines: List[str]):
216216
newLines = []
217217

218218
for line in lines:
@@ -247,6 +247,22 @@ def updateLicense(filename: str, lines: List[str]):
247247
return newLines
248248

249249

250+
def updateSourceDateEpoch(filename: str, lines: List[str]):
251+
newLines = []
252+
253+
envSourceDateEpoch = 'env["SOURCE_DATE_EPOCH"] = '
254+
setEnvironmentFound = False
255+
for line in lines:
256+
if line.startswith(envSourceDateEpoch):
257+
line = re.sub(r"\d+", str(int(time.time())), line)
258+
setEnvironmentFound = True
259+
newLines.append(line)
260+
if not setEnvironmentFound:
261+
raise RuntimeError(f"Call of {envSourceDateEpoch!r} not found in {filename!r}.")
262+
263+
return newLines
264+
265+
250266
def main():
251267
for root, dirs, files in os.walk(".", topdown=True):
252268

@@ -264,14 +280,18 @@ def skip_dir(dir: str) -> bool:
264280
handlers.append(updateCopyrightString)
265281
if filename == "deploy.yml":
266282
handlers.append(updateCallOfReleaseChecklist)
267-
if filename == "CHANGELOG.rst":
268-
handlers.append(updateChangelog)
269283
if filename == "README.rst":
270284
handlers.append(updateReadme)
271-
if filename.endswith(".rst"):
272-
handlers.append(updatDocumentation)
273285
if filename == "LICENSE.txt":
274286
handlers.append(updateLicense)
287+
if filename == "test_gcovr.py":
288+
handlers.append(updateSourceDateEpoch)
289+
290+
if not VERSION.endswith("+master"):
291+
if filename == "CHANGELOG.rst":
292+
handlers.append(updateChangelog)
293+
if filename.endswith(".rst"):
294+
handlers.append(updateDocumentation)
275295

276296
if handlers:
277297
with open(fullname) as f:

admin/release_checklist

+2-3
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,10 @@ grep -qF "version=\"gcovr $target_version\"" doc/examples/example_cobertura.xml
7979
|| error "examples: Please regenerate: " \
8080
"cd doc/examples; ./example_cobertura.sh > example_cobertura.xml"
8181

82-
target_version_html="$(echo "$target_version" | sed -e "s/.*+//")"
83-
grep -qF "GCOVR (Version $target_version_html)" doc/examples/example_html.html \
82+
grep -qF "GCOVR (Version $target_version)" doc/examples/example_html.html \
8483
|| error "examples: Please regenerate: " \
8584
"cd doc/examples; ./example_html.sh > example_html.html"
86-
grep -qF "GCOVR (Version $target_version_html)" doc/examples/example_html.details.html \
85+
grep -qF "GCOVR (Version $target_version)" doc/examples/example_html.details.html \
8786
|| error "examples: Please regenerate: " \
8887
"cd doc/examples; ./example_html.sh > example_html.details.html"
8988

doc/examples/example_cobertura.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'>
3-
<coverage line-rate="0.8571428571428571" branch-rate="0.5" lines-covered="6" lines-valid="7" branches-covered="1" branches-valid="2" complexity="0.0" timestamp="1678315055" version="gcovr 6.0">
3+
<coverage line-rate="0.8571428571428571" branch-rate="0.5" lines-covered="6" lines-valid="7" branches-covered="1" branches-valid="2" complexity="0.0" timestamp="1678392876" version="gcovr 6.0+master">
44
<sources>
55
<source>.</source>
66
</sources>

doc/examples/example_html.details.example.cpp.9597a7a3397b8e3a48116e2a3afb4154.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ <h1>GCC Code Coverage Report</h1>
276276
</main>
277277

278278
<footer>
279-
Generated by: <a href="http://gcovr.com/en/6.0">GCOVR (Version 6.0)</a>
279+
Generated by: <a href="http://gcovr.com/en/master">GCOVR (Version 6.0+master)</a>
280280
</footer>
281281
</body>
282282
</html>

doc/examples/example_html.details.functions.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h1>GCC Code Coverage Report</h1>
105105
</main>
106106

107107
<footer>
108-
Generated by: <a href="http://gcovr.com/en/6.0">GCOVR (Version 6.0)</a>
108+
Generated by: <a href="http://gcovr.com/en/master">GCOVR (Version 6.0+master)</a>
109109
</footer>
110110
</body>
111111
</html>

doc/examples/example_html.details.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h1>GCC Code Coverage Report</h1>
108108
</main>
109109

110110
<footer>
111-
Generated by: <a href="http://gcovr.com/en/6.0">GCOVR (Version 6.0)</a>
111+
Generated by: <a href="http://gcovr.com/en/master">GCOVR (Version 6.0+master)</a>
112112
</footer>
113113
</body>
114114
</html>

doc/examples/example_html.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ <h1>GCC Code Coverage Report</h1>
699699
</main>
700700

701701
<footer>
702-
Generated by: <a href="http://gcovr.com/en/6.0">GCOVR (Version 6.0)</a>
702+
Generated by: <a href="http://gcovr.com/en/master">GCOVR (Version 6.0+master)</a>
703703
</footer>
704704
</body>
705705
</html>

doc/examples/test_examples.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

doc/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/coverage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/decision_analysis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/exclusions/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/exclusions/markers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/exclusions/noncode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/gcov.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/gcov_parser.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/merging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# ************************** Copyrights and license ***************************
44
#
5-
# This file is part of gcovr 6.0, a parsing and reporting tool for gcov.
5+
# This file is part of gcovr 6.0+master, a parsing and reporting tool for gcov.
66
# https://gcovr.com/en/stable
77
#
88
# _____________________________________________________________________________

gcovr/tests/add_coverages/reference/clang-10/cobertura.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version='1.0' encoding='UTF-8'?>
22
<!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-04.dtd'>
3-
<coverage line-rate="1.0" branch-rate="0.0" lines-covered="12" lines-valid="12" branches-covered="0" branches-valid="0" complexity="0.0" timestamp="1662755100" version="gcovr 5.2">
3+
<coverage line-rate="1.0" branch-rate="0.0" lines-covered="12" lines-valid="12" branches-covered="0" branches-valid="0" complexity="0.0" timestamp="" version="gcovr 6.0+master">
44
<sources>
55
<source>.</source>
66
</sources>

gcovr/tests/add_coverages/reference/clang-10/coverage.bar.cpp.e7a3224e852d4c9e084f9127df0315df.html

+3-12
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h1>GCC Code Coverage Report</h1>
2727
</tr>
2828
<tr>
2929
<th scope="row">Date:</th>
30-
<td>0000-00-00 00:00:00</td>
30+
<td>2023-03-09 20:14:36+00:00</td>
3131
</tr>
3232
</table>
3333
</div>
@@ -86,6 +86,7 @@ <h1>GCC Code Coverage Report</h1>
8686
</tr>
8787
</table>
8888
</details>
89+
8990
</nav>
9091

9192
<main>
@@ -97,79 +98,69 @@ <h1>GCC Code Coverage Report</h1>
9798
<th align="right">Exec</th>
9899
<th align="left">Source</th>
99100
</tr>
100-
101-
102101
<tr class="source-line">
103102
<td class="lineno"><a id="l1" href="#l1">1</a></td>
104103
<td class="linebranch">
105104
</td>
106105
<td class="linecount coveredLine">1</td>
107106
<td class="src coveredLine"><span class="kt">int</span> <span class="nf">bar</span><span class="p">()</span></td>
108107
</tr>
109-
110108
<tr class="source-line">
111109
<td class="lineno"><a id="l2" href="#l2">2</a></td>
112110
<td class="linebranch">
113111
</td>
114112
<td class="linecount "></td>
115113
<td class="src "><span class="p">{</span></td>
116114
</tr>
117-
118115
<tr class="source-line">
119116
<td class="lineno"><a id="l3" href="#l3">3</a></td>
120117
<td class="linebranch">
121118
</td>
122119
<td class="linecount coveredLine">1</td>
123120
<td class="src coveredLine"><span class="kt">int</span> <span class="n">x</span><span class="o">=</span><span class="mi">2</span><span class="p">;</span></td>
124121
</tr>
125-
126122
<tr class="source-line">
127123
<td class="lineno"><a id="l4" href="#l4">4</a></td>
128124
<td class="linebranch">
129125
</td>
130126
<td class="linecount coveredLine">1</td>
131127
<td class="src coveredLine"><span class="kt">int</span> <span class="n">y</span><span class="o">=</span><span class="mi">2</span><span class="p">;</span></td>
132128
</tr>
133-
134129
<tr class="source-line">
135130
<td class="lineno"><a id="l5" href="#l5">5</a></td>
136131
<td class="linebranch">
137132
</td>
138133
<td class="linecount coveredLine">1</td>
139134
<td class="src coveredLine"><span class="k">return</span> <span class="n">x</span><span class="o">-</span><span class="n">y</span><span class="p">;</span></td>
140135
</tr>
141-
142136
<tr class="source-line">
143137
<td class="lineno"><a id="l6" href="#l6">6</a></td>
144138
<td class="linebranch">
145139
</td>
146140
<td class="linecount "></td>
147141
<td class="src "><span class="p">}</span></td>
148142
</tr>
149-
150143
<tr class="source-line">
151144
<td class="lineno"><a id="l7" href="#l7">7</a></td>
152145
<td class="linebranch">
153146
</td>
154147
<td class="linecount "></td>
155148
<td class="src "></td>
156149
</tr>
157-
158150
<tr class="source-line">
159151
<td class="lineno"><a id="l8" href="#l8">8</a></td>
160152
<td class="linebranch">
161153
</td>
162154
<td class="linecount "></td>
163155
<td class="src "></td>
164156
</tr>
165-
166157
</table>
167158
</div>
168159
<hr/>
169160
</main>
170161

171162
<footer>
172-
Generated by: <a href="http://gcovr.com/en/x.x">GCOVR (Version x.x)</a>
163+
Generated by: <a href="http://gcovr.com/en/master">GCOVR (Version 6.0+master)</a>
173164
</footer>
174165
</body>
175166
</html>

0 commit comments

Comments
 (0)