Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Fix npm package update #361

Merged
merged 6 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cog.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ post_package_bump_hooks = [
# prepare the github release changelog file
"mkdir -p ../../releases",
"../../tools/extract_changelog.sh CHANGELOG.md > ../../releases/GITHUB_CHANGELOG-{{package}}.md",
# update the version number to have a .dev0 suffix (when possible, only done for python plugins)
# update the version number to have a `dev0` suffix
"../../tools/update_version.sh {{package}} {{version}} --dev",
"git commit -m 'chore(version): update {{package}} version to {{version}}'",
# push the tag and the commits to main
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_js/
1 change: 1 addition & 0 deletions plugins/ui/src/deephaven/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_js/
13 changes: 11 additions & 2 deletions tools/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,7 @@ case "$package" in
update_file table-example/src/js/package.json '"version": "' '",'
;;
ui)
update_file ui/src/js/package.json '"version": "' '",'
update_file ui/src/setup.cfg 'version = ' '' "$extra"
update_file ui/setup.cfg 'version = ' '' "$extra"
;;
utilities)
update_file utilities/setup.cfg 'version = ' '' "$extra"
Expand All @@ -152,4 +151,14 @@ case "$package" in
}
esac

# We still need to bump these JS packages for Enterprise legacy reasons, even though they're packaged with Python
npm_version="${version}"
[ "$dev" = true ] && npm_version="${version}-dev0"
case "$package" in
matplotlib | plotly | plotly-express | ui)
# The working directory is already `plugins/<package-name>`, so we just specify workspace as `src/js` and it does the right thing
npm version "$npm_version" --workspace=src/js
;;
esac

log_info "Done updating $package version to $version${extra}"
Loading