Skip to content

Commit db3d239

Browse files
committed
Some fixes
1 parent 0bc28b3 commit db3d239

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

package-lock.json

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ version-cmd = "python scripts/bump_version.py --force"
136136
before-bump-version = [
137137
"npm install"
138138
]
139+
before-build-npm = [
140+
"npm run build"
141+
]
139142

140143
[tool.pytest.ini_options]
141144
testpaths = "nbdime/tests"

scripts/bump_version.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def bump(force: bool, spec: str) -> None:
3030
)
3131
if len(output) > 0:
3232
print(output)
33-
# raise Exception("Must be in a clean git state with no untracked files")
33+
raise Exception("Must be in a clean git state with no untracked files")
3434

3535
print(f"Executing 'python -m hatch version {spec}'...")
3636
run(
@@ -41,11 +41,11 @@ def bump(force: bool, spec: str) -> None:
4141
lerna_cmd = LERNA_CMD
4242
js_spec = spec
4343
if spec in ["alpha", "a", "beta", "b", "rc"]:
44-
js_spec = " --force-publish prerelease"
44+
js_spec = "--force-publish prerelease"
4545
elif spec == "release":
46-
js_spec = " --conventional-commits --no-changelog --conventional-graduate"
46+
js_spec = "--conventional-commits --no-changelog --conventional-graduate"
4747
else:
48-
js_spec += f" --force-publish"
48+
js_spec = f"--force-publish " + js_spec
4949

5050
# bump the JS packages
5151
if force:
@@ -54,6 +54,9 @@ def bump(force: bool, spec: str) -> None:
5454
print(f"Executing '{lerna_cmd}'...")
5555
run(shlex.split(lerna_cmd), cwd=HERE, check=True, shell=True)
5656

57+
print(f"Changed made:")
58+
run(["git", "diff"], cwd=HERE, check=True)
59+
5760

5861
if __name__ == "__main__":
5962
parser = argparse.ArgumentParser("bump_version", "Bump package version")

0 commit comments

Comments
 (0)