Skip to content

Commit 1fa041a

Browse files
committed
🚀 releasing version 2.7.1 @ 2021-08-24 22:51
[skip ci]
1 parent e7431a2 commit 1fa041a

File tree

6 files changed

+58
-23
lines changed

6 files changed

+58
-23
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ This project was forked from version 1.7.4 of [mbed-tools-ci-scripts](https://gi
1717

1818
[//]: # (begin_release_notes)
1919

20+
"2.7.1" (2021-08-24)"2.7.1" (2021-08-24)
21+
====================
22+
23+
Bugfixes
24+
--------
25+
26+
- Fixed issue with goreleaser requiring tag to be checked out (#202108242248)
27+
28+
2029
"2.7.0" (2021-08-24)"2.7.0" (2021-08-24)
2130
====================
2231

continuous_delivery_scripts/_version.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
1111
This file is autogenerated, do not modify by hand.
1212
"""
13-
__version__ = "2.7.0"
14-
COMMIT = "78bd7a6bfe7f6b89060cdcf08c9519b9e863221b"
13+
__version__ = "2.7.1"
14+
COMMIT = "e7431a294fbd3b6553ece6f9471c01c5a03b1eab"
1515
MAJOR = 2
1616
MINOR = 7
17-
PATCH = 0
17+
PATCH = 1

docs/plugins/golang.html

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ <h1 class="title">Module <code>continuous_delivery_scripts.plugins.golang</code>
4444
from continuous_delivery_scripts.utils.language_specifics_base import BaseLanguage, get_language_from_file_name
4545
from continuous_delivery_scripts.spdx_report.spdx_project import SpdxProject
4646
from continuous_delivery_scripts.utils.configuration import configuration, ConfigurationVariable
47+
from continuous_delivery_scripts.utils.git_helpers import LocalProjectRepository
4748

4849
logger = logging.getLogger(__name__)
4950

@@ -101,18 +102,6 @@ <h1 class="title">Module <code>continuous_delivery_scripts.plugins.golang</code>
101102
check_call(_generate_goreleaser_check_command_list(), cwd=ROOT_DIR)
102103

103104

104-
def _call_goreleaser_release(version: str) -&gt; None:
105-
&#34;&#34;&#34;Calls go releaser release to upload packages.&#34;&#34;&#34;
106-
logger.info(&#34;Installing GoReleaser if missing.&#34;)
107-
check_call(_install_goreleaser_command_list())
108-
logger.info(&#34;Release package.&#34;)
109-
changelogPath = configuration.get_value(ConfigurationVariable.CHANGELOG_FILE_PATH)
110-
env = os.environ
111-
env[ENVVAR_GORELEASER_CUSTOMISED_TAG] = version
112-
env[ENVVAR_GORELEASER_GIT_TOKEN] = configuration.get_value(ConfigurationVariable.GIT_TOKEN)
113-
check_call(_generate_goreleaser_release_command_list(changelogPath), cwd=ROOT_DIR, env=env)
114-
115-
116105
class Go(BaseLanguage):
117106
&#34;&#34;&#34;Specific actions for a Golang project.&#34;&#34;&#34;
118107

@@ -133,7 +122,7 @@ <h1 class="title">Module <code>continuous_delivery_scripts.plugins.golang</code>
133122
def release_package_to_repository(self, version: str) -&gt; None:
134123
&#34;&#34;&#34;No operation.&#34;&#34;&#34;
135124
super().release_package_to_repository(version)
136-
_call_goreleaser_release(version)
125+
self._call_goreleaser_release(version)
137126

138127
def check_credentials(self) -&gt; None:
139128
&#34;&#34;&#34;Checks any credentials.&#34;&#34;&#34;
@@ -160,7 +149,26 @@ <h1 class="title">Module <code>continuous_delivery_scripts.plugins.golang</code>
160149

161150
def should_clean_before_packaging(self) -&gt; bool:
162151
&#34;&#34;&#34;States whether the repository must be cleaned before packaging happens.&#34;&#34;&#34;
163-
return True</code></pre>
152+
return True
153+
154+
def _call_goreleaser_release(self, version: str) -&gt; None:
155+
&#34;&#34;&#34;Calls go releaser release to upload packages.&#34;&#34;&#34;
156+
logger.info(&#34;Installing GoReleaser if missing.&#34;)
157+
check_call(_install_goreleaser_command_list())
158+
tag = self.get_version_tag(version)
159+
# The tag of the release must be retrieved
160+
# See https://github.com/goreleaser/goreleaser/discussions/1426
161+
logger.info(f&#34;Checking out tag: {tag}.&#34;)
162+
with LocalProjectRepository() as git:
163+
git.configure_for_github()
164+
git.fetch()
165+
git.checkout(f&#34;tags/{tag}&#34;)
166+
logger.info(&#34;Release package.&#34;)
167+
changelogPath = configuration.get_value(ConfigurationVariable.CHANGELOG_FILE_PATH)
168+
env = os.environ
169+
env[ENVVAR_GORELEASER_CUSTOMISED_TAG] = version
170+
env[ENVVAR_GORELEASER_GIT_TOKEN] = configuration.get_value(ConfigurationVariable.GIT_TOKEN)
171+
check_call(_generate_goreleaser_release_command_list(changelogPath), cwd=ROOT_DIR, env=env)</code></pre>
164172
</details>
165173
</section>
166174
<section>
@@ -201,7 +209,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
201209
def release_package_to_repository(self, version: str) -&gt; None:
202210
&#34;&#34;&#34;No operation.&#34;&#34;&#34;
203211
super().release_package_to_repository(version)
204-
_call_goreleaser_release(version)
212+
self._call_goreleaser_release(version)
205213

206214
def check_credentials(self) -&gt; None:
207215
&#34;&#34;&#34;Checks any credentials.&#34;&#34;&#34;
@@ -228,7 +236,26 @@ <h2 class="section-title" id="header-classes">Classes</h2>
228236

229237
def should_clean_before_packaging(self) -&gt; bool:
230238
&#34;&#34;&#34;States whether the repository must be cleaned before packaging happens.&#34;&#34;&#34;
231-
return True</code></pre>
239+
return True
240+
241+
def _call_goreleaser_release(self, version: str) -&gt; None:
242+
&#34;&#34;&#34;Calls go releaser release to upload packages.&#34;&#34;&#34;
243+
logger.info(&#34;Installing GoReleaser if missing.&#34;)
244+
check_call(_install_goreleaser_command_list())
245+
tag = self.get_version_tag(version)
246+
# The tag of the release must be retrieved
247+
# See https://github.com/goreleaser/goreleaser/discussions/1426
248+
logger.info(f&#34;Checking out tag: {tag}.&#34;)
249+
with LocalProjectRepository() as git:
250+
git.configure_for_github()
251+
git.fetch()
252+
git.checkout(f&#34;tags/{tag}&#34;)
253+
logger.info(&#34;Release package.&#34;)
254+
changelogPath = configuration.get_value(ConfigurationVariable.CHANGELOG_FILE_PATH)
255+
env = os.environ
256+
env[ENVVAR_GORELEASER_CUSTOMISED_TAG] = version
257+
env[ENVVAR_GORELEASER_GIT_TOKEN] = configuration.get_value(ConfigurationVariable.GIT_TOKEN)
258+
check_call(_generate_goreleaser_release_command_list(changelogPath), cwd=ROOT_DIR, env=env)</code></pre>
232259
</details>
233260
<h3>Ancestors</h3>
234261
<ul class="hlist">
@@ -337,7 +364,7 @@ <h3>Methods</h3>
337364
<pre><code class="python">def release_package_to_repository(self, version: str) -&gt; None:
338365
&#34;&#34;&#34;No operation.&#34;&#34;&#34;
339366
super().release_package_to_repository(version)
340-
_call_goreleaser_release(version)</code></pre>
367+
self._call_goreleaser_release(version)</code></pre>
341368
</details>
342369
</dd>
343370
</dl>

docs/third_party_IP_report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</head>
6666
<body>
6767
<h1>Project's 3rd party IP report</h1>
68-
<p><i>2021-08-24 21:22:51.967342</i></p>
68+
<p><i>2021-08-24 22:51:18.858221</i></p>
6969
<h2>Summary</h2>
7070
<table>
7171
<thead>

docs/third_party_IP_report.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
3rd party IP report for continuous-delivery-scripts
22

3-
2021-08-24 21:22:51.967342
3+
2021-08-24 22:51:18.858221
44

55
# Summary:
66
Licence compliance: Compliant

news/202108242248.bugfix

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)