Skip to content

Commit 9d651f4

Browse files
committed
Merge branch 'feature/v0.3.16' into develop
2 parents d1d344b + 9bb519a commit 9d651f4

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ We are grateful 💖 for the support of our
5757
If you'd like to join them, please consider
5858
`becoming a sponsor on OpenCollective <https://opencollective.com/colour-science>`__.
5959

60+
.. begin-trim-long-description
61+
6062
.. raw:: html
6163

6264
<h2 align="center">Special Sponsors</h2>
@@ -99,6 +101,8 @@ If you'd like to join them, please consider
99101
</tbody>
100102
</table>
101103

104+
.. end-trim-long-description
105+
102106
Features
103107
--------
104108

@@ -1254,6 +1258,8 @@ Code of Conduct
12541258
The *Code of Conduct*, adapted from the `Contributor Covenant 1.4 <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>`__,
12551259
is available on the `Code of Conduct <https://www.colour-science.org/code-of-conduct/>`__ page.
12561260
1261+
.. begin-trim-long-description
1262+
12571263
Thank You!
12581264
----------
12591265
@@ -1315,6 +1321,8 @@ Thank You!
13151321
</tbody>
13161322
</table>
13171323
1324+
.. end-trim-long-description
1325+
13181326
About
13191327
-----
13201328

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
alabaster==0.7.12
22
appnope==0.1.0
33
aspy.yaml==1.3.0
4+
atomicwrites==1.3.0
45
attrs==19.3.0
56
Babel==2.8.0
67
backcall==0.1.0

tasks.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,10 @@ def build(ctx):
352352
"""
353353

354354
message_box('Building...')
355+
if 'modified: pyproject.toml' in ctx.run('git status').stdout:
356+
raise RuntimeError(
357+
'Please commit your changes to the "pyproject.toml" file!')
358+
355359
pyproject_content = toml.load('pyproject.toml')
356360
pyproject_content['tool']['poetry']['name'] = PYPI_PACKAGE_NAME
357361
pyproject_content['tool']['poetry']['packages'] = [{
@@ -361,8 +365,25 @@ def build(ctx):
361365
with open('pyproject.toml', 'w') as pyproject_file:
362366
toml.dump(pyproject_content, pyproject_file)
363367

368+
if 'modified: README.rst' in ctx.run('git status').stdout:
369+
raise RuntimeError(
370+
'Please commit your changes to the "README.rst" file!')
371+
372+
with open('README.rst', 'r') as readme_file:
373+
readme_content = readme_file.read()
374+
375+
with open('README.rst', 'w') as readme_file:
376+
readme_file.write(
377+
re.sub(
378+
('(\\.\\. begin-trim-long-description.*?'
379+
'\\.\\. end-trim-long-description)'),
380+
'',
381+
readme_content,
382+
flags=re.DOTALL))
383+
364384
ctx.run('poetry build')
365385
ctx.run('git checkout -- pyproject.toml')
386+
ctx.run('git checkout -- README.rst')
366387

367388
with ctx.cd('dist'):
368389
ctx.run('tar -xvf {0}-{1}.tar.gz'.format(PYPI_PACKAGE_NAME,
@@ -405,6 +426,8 @@ def sub_callable(match):
405426
with open('setup.py', 'w') as setup_file:
406427
setup_file.write(source)
407428

429+
ctx.run('twine check dist/*')
430+
408431

409432
@task
410433
def virtualise(ctx, tests=True):
@@ -488,7 +511,7 @@ def tag(ctx):
488511
ctx.run('git flow release finish v{0}'.format(version))
489512

490513

491-
@task(clean, build)
514+
@task(build)
492515
def release(ctx):
493516
"""
494517
Releases the project to *Pypi* with *Twine*.

0 commit comments

Comments
 (0)