From 7d3db24476564efbc291611ab3702d5e7ed7f514 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Thu, 14 Mar 2024 21:03:30 -0400 Subject: [PATCH 1/6] build: Add .gitignore for the generated _js folders --- plugins/matplotlib/src/deephaven/plugin/matplotlib/.gitignore | 1 + plugins/ui/src/deephaven/ui/.gitignore | 1 + 2 files changed, 2 insertions(+) create mode 100644 plugins/matplotlib/src/deephaven/plugin/matplotlib/.gitignore create mode 100644 plugins/ui/src/deephaven/ui/.gitignore diff --git a/plugins/matplotlib/src/deephaven/plugin/matplotlib/.gitignore b/plugins/matplotlib/src/deephaven/plugin/matplotlib/.gitignore new file mode 100644 index 000000000..fd2ac954b --- /dev/null +++ b/plugins/matplotlib/src/deephaven/plugin/matplotlib/.gitignore @@ -0,0 +1 @@ +_js/ \ No newline at end of file diff --git a/plugins/ui/src/deephaven/ui/.gitignore b/plugins/ui/src/deephaven/ui/.gitignore new file mode 100644 index 000000000..fd2ac954b --- /dev/null +++ b/plugins/ui/src/deephaven/ui/.gitignore @@ -0,0 +1 @@ +_js/ \ No newline at end of file From 8946ebf340ed0c409a06ab2144314fed96fc0c8b Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Fri, 15 Mar 2024 08:56:19 -0400 Subject: [PATCH 2/6] Use `npm version` to update the version - Fixes #259 --- tools/update_version.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/update_version.sh b/tools/update_version.sh index 4f89bdf24..0afbbb95a 100755 --- a/tools/update_version.sh +++ b/tools/update_version.sh @@ -124,19 +124,21 @@ case "$package" in update_file json/src/deephaven/plugin/json/__init__.py '__version__ = "' '"' "$extra" ;; matplotlib) + npm version "$version" --workspace=plugins/matplotlib/src/js update_file matplotlib/setup.cfg 'version = ' '' "$extra" ;; plotly) update_file plotly/src/deephaven/plugin/plotly/__init__.py '__version__ = "' '"' "$extra" ;; plotly-express) + npm version "$version" --workspace=plugins/plotly-express/src/js update_file plotly-express/setup.cfg 'version = ' '' "$extra" ;; table-example) update_file table-example/src/js/package.json '"version": "' '",' ;; ui) - update_file ui/src/js/package.json '"version": "' '",' + npm version "$version" --workspace=plugins/ui/src/js update_file ui/src/setup.cfg 'version = ' '' "$extra" ;; utilities) From 7f7b0a69a3b33891dbc3fc69333fd3b728aa1dc4 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Fri, 15 Mar 2024 09:08:56 -0400 Subject: [PATCH 3/6] Run `npm version` correctly - Was running from the wrong dir --- tools/update_version.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/update_version.sh b/tools/update_version.sh index 0afbbb95a..cfb138bd3 100755 --- a/tools/update_version.sh +++ b/tools/update_version.sh @@ -124,21 +124,18 @@ case "$package" in update_file json/src/deephaven/plugin/json/__init__.py '__version__ = "' '"' "$extra" ;; matplotlib) - npm version "$version" --workspace=plugins/matplotlib/src/js update_file matplotlib/setup.cfg 'version = ' '' "$extra" ;; plotly) update_file plotly/src/deephaven/plugin/plotly/__init__.py '__version__ = "' '"' "$extra" ;; plotly-express) - npm version "$version" --workspace=plugins/plotly-express/src/js update_file plotly-express/setup.cfg 'version = ' '' "$extra" ;; table-example) update_file table-example/src/js/package.json '"version": "' '",' ;; ui) - npm version "$version" --workspace=plugins/ui/src/js update_file ui/src/setup.cfg 'version = ' '' "$extra" ;; utilities) @@ -154,4 +151,13 @@ case "$package" in } esac +# We still need to bump these JS packages for Enterprise legacy reasons, even though they're packaged with Python +# Can be removed in the future. +case "$package" in + matplotlib | plotly | plotly-express | ui) + # The working directory is already `plugins/`, so we just specify workspace as `src/js` and it does the right thing + npm version "$version" --workspace=src/js + ;; +esac + log_info "Done updating $package version to $version${extra}" From ee0351983e28b91bc558717db2f4349639d8c3bf Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Fri, 15 Mar 2024 09:10:40 -0400 Subject: [PATCH 4/6] Fix path the ui/setup.cfg --- tools/update_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/update_version.sh b/tools/update_version.sh index cfb138bd3..122a91e32 100755 --- a/tools/update_version.sh +++ b/tools/update_version.sh @@ -136,7 +136,7 @@ case "$package" in update_file table-example/src/js/package.json '"version": "' '",' ;; ui) - update_file ui/src/setup.cfg 'version = ' '' "$extra" + update_file ui/setup.cfg 'version = ' '' "$extra" ;; utilities) update_file utilities/setup.cfg 'version = ' '' "$extra" From a5a8e099236f1619a9a52a6dcf42a1196b8637c7 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Fri, 15 Mar 2024 09:16:13 -0400 Subject: [PATCH 5/6] Add `-dev0` to the end of the dev build for npm --- tools/update_version.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/update_version.sh b/tools/update_version.sh index 122a91e32..d8bbd62ef 100755 --- a/tools/update_version.sh +++ b/tools/update_version.sh @@ -152,11 +152,12 @@ case "$package" in esac # We still need to bump these JS packages for Enterprise legacy reasons, even though they're packaged with Python -# Can be removed in the future. +npm_version="${version}" +[ "$dev" = true ] && npm_version="${version}-dev0" case "$package" in matplotlib | plotly | plotly-express | ui) # The working directory is already `plugins/`, so we just specify workspace as `src/js` and it does the right thing - npm version "$version" --workspace=src/js + npm version "$npm_version" --workspace=src/js ;; esac From 4e4be1cb4f0574b51adb0fffc070d9e8e046d3f1 Mon Sep 17 00:00:00 2001 From: Mike Bender Date: Fri, 15 Mar 2024 09:18:55 -0400 Subject: [PATCH 6/6] Fix comment in cog.toml --- cog.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cog.toml b/cog.toml index 6d8c99871..267ed42f3 100644 --- a/cog.toml +++ b/cog.toml @@ -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