Skip to content

Commit e6e9190

Browse files
committed
'update version to 0.37.0'
1 parent a66eae4 commit e6e9190

File tree

11 files changed

+71
-57
lines changed

11 files changed

+71
-57
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.36.3
1+
0.37.0

docs/source/_custom_js/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/source/about/changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ scheme for the project adheres to `Semantic Versioning <https://semver.org/>`__.
1616
Unreleased
1717
----------
1818

19+
Nothing yet...
20+
21+
22+
0.37.0
23+
------
24+
1925
Added:
2026

2127
- Support for keys in HTML fragments - :issue:`682`

docs/source/about/contributor-guide.rst

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -268,29 +268,35 @@ Where you can then navigate to http://localhost:5000..
268268
Release Process
269269
---------------
270270

271-
1. Update version
272-
2. Add changelog entry
273-
274-
- Include merged pull requests
275-
- Include closed issues
276-
277-
3. Commit final release changes
278-
4. Create a release tag
279-
5. Manually author a release in GitHub
271+
1. :ref:`Update version <Update Release Version>`
272+
2. Create a release tag
273+
3. Manually author a release in GitHub
280274

281275

282276
Update Release Version
283277
......................
284278

285-
To update the version for all core Javascript and Python packages in IDOM run:
279+
To simultaneously update the version for:
280+
281+
- Python packages
282+
- Javascript packages
283+
- The :ref:`changelog`
284+
285+
Run the following command:
286286

287287
.. code-block:: bash
288288
289289
nox -s update_version -- <new-version>
290290
291291
.. note::
292292

293-
The new version must adhere to `SemVer <https://semver.org/>`__.
293+
The ``<new-version>`` must adhere to `SemVer <https://semver.org/>`__.
294+
295+
Then commit those changes:
296+
297+
.. code-block:: bash
298+
299+
git commit -m 'update version to <new-version>'
294300
295301
296302
Creating The Release

noxfile.py

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,35 @@ def build_js(session: Session) -> None:
289289
@nox.session
290290
def tag(session: Session) -> None:
291291
"""Create a new git tag"""
292+
if len(session.posargs) > 1:
293+
session.error("To many arguments")
294+
295+
try:
296+
new_version = session.posargs[0]
297+
except IndexError:
298+
session.error("No version tag given")
299+
300+
install_requirements_file(session, "make-release")
301+
302+
# check that version is valid semver
303+
session.run("pysemver", "check", new_version)
304+
305+
old_version = get_version()
306+
session.log(f"Old version: {old_version}")
307+
session.log(f"New version: {new_version}")
308+
set_version(new_version)
309+
310+
session.run("python", "scripts/update_versions.py")
311+
312+
# trigger npm install to update package-lock.json
313+
session.install("-e", ".")
314+
292315
try:
293316
session.run(
294317
"git",
295318
"diff",
296319
"--cached",
297320
"--exit-code",
298-
silent=True,
299321
external=True,
300322
)
301323
except Exception:
@@ -305,7 +327,7 @@ def tag(session: Session) -> None:
305327
install_requirements_file(session, "make-release")
306328
session.run("pysemver", "check", version)
307329

308-
changelog_file = ROOT / "docs" / "source" / "developing-idom" / "changelog.rst"
330+
changelog_file = ROOT / "docs" / "source" / "about" / "changelog.rst"
309331
for line in changelog_file.read_text().splitlines():
310332
if line == version:
311333
session.log(f"Found changelog section for version {version}")
@@ -316,37 +338,17 @@ def tag(session: Session) -> None:
316338
f"make sure you have a title section called {version}."
317339
)
318340

319-
session.run("git", "tag", version, external=True)
320-
321-
if "push" in session.posargs:
322-
session.run("git", "push", "--tags", external=True)
341+
if session.interactive:
342+
session.log()
343+
response = input("confirm (yes/no): ").lower()
344+
if response != "yes":
345+
return None
323346

324-
325-
@nox.session
326-
def update_version(session: Session) -> None:
327-
"""Update the version of all Python and Javascript packages in this repo"""
328-
if len(session.posargs) > 1:
329-
session.error("To many arguments")
330-
331-
try:
332-
new_version = session.posargs[0]
333-
except IndexError:
334-
session.error("No version tag given")
335-
336-
install_requirements_file(session, "make-release")
337-
338-
# check that version is valid semver
339-
session.run("pysemver", "check", new_version)
340-
341-
old_version = get_version()
342-
session.log(f"Old version: {old_version}")
343-
session.log(f"New version: {new_version}")
344-
set_version(new_version)
345-
346-
session.run("python", "scripts/update_versions.py")
347-
348-
# trigger npm install to update package-lock.json
349-
session.install("-e", ".")
347+
# stage, commit, tag, and push version bump
348+
session.run("git", "add", "--all")
349+
session.run("git", "commit", "-m", repr(f"update version to {new_version}"))
350+
session.run("git", "tag", version, external=True)
351+
session.run("git", "push", "--tags", external=True)
350352

351353

352354
@nox.session(reuse_venv=True)

scripts/update_versions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ def update_changelog_version(new_version: str) -> None:
4545
old_content = CHANGELOG_FILE.read_text().split("\n")
4646

4747
new_content = []
48-
for index in range(0, len(old_content), 2):
48+
for index in range(len(old_content) - 1):
4949
if index == len(old_content) - 2:
5050
# reached end of file
5151
continue
5252

53-
old_lines = old_content[index : index + 2]
54-
if old_lines[0] == "Unreleased" and old_lines[1] == ("-" * len(old_lines[0])):
53+
this_line, next_line = old_content[index : index + 2]
54+
if this_line == "Unreleased" and next_line == ("-" * len(this_line)):
5555
new_content.append(_UNRELEASED_SECTION)
5656
new_content.append(new_version)
5757
new_content.append("-" * len(new_version))
5858
new_content.extend(old_content[index + 2 :])
5959
break
6060
else:
61-
new_content.extend(old_lines)
61+
new_content.append(this_line)
6262
else:
6363
raise ValueError(f"Did not find 'Unreleased' section in {CHANGELOG_FILE}")
6464

src/client/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"publish": "npm --workspaces publish",
1515
"test": "npm --workspaces test"
1616
},
17-
"version": "0.36.3",
17+
"version": "0.37.0",
1818
"workspaces": [
1919
"./packages/*"
2020
]

src/client/packages/idom-app-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
"format": "prettier --write ./src",
2222
"test": "echo 'no tests'"
2323
},
24-
"version": "0.36.3"
24+
"version": "0.37.0"
2525
}

src/client/packages/idom-client-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
"test": "uvu tests"
3232
},
3333
"type": "module",
34-
"version": "0.36.3"
34+
"version": "0.37.0"
3535
}

0 commit comments

Comments
 (0)