Skip to content

Commit

Permalink
chore(js): Allow triggering release on external artifact static_viewe…
Browse files Browse the repository at this point in the history
…r.html

Previously, when a new version of static_viewer.html is released on the master
of vtk-js we couldn't trigger a release because we do not commit this file but
rather grab it during release. This commit adds the hash of the latest version
in a file and a hash check that runs during release but does not trigger a
failure on a mismatch but rather a warning.
So now if static_viewer.html is updated on vtk-js:
- If we do not care `.fetch_externals.sh` will just emit a warning
- If we **do** care we update .static_viewer.sha256 and trigger a new release
  on trame-vtk even if no other `trame-vtk` change happened during last
  release.
  • Loading branch information
ChristosT authored and jourdain committed May 6, 2024
1 parent 6a57e2f commit eb8461a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .fetch_externals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ set -e
mkdir -p ./trame_vtk/modules/common/serve
curl https://unpkg.com/vue-vtk-js@3.2.1 -Lo ./trame_vtk/modules/common/serve/trame-vtk.js
# echo 19e7c20470b952cc7b38f1434180b5ec ./trame_vtk/modules/common/serve/trame-vtk.js | md5sum -c --status && echo OK
curl https://kitware.github.io/vtk-js/examples/OfflineLocalView/OfflineLocalView.html -Lo ./trame_vtk/tools/static_viewer.html
curl https://kitware.github.io/vtk-js/examples/OfflineLocalView/OfflineLocalView.html -Lo ./trame_vtk/tools/static_viewer.html

if ! sha256sum --check .static_viewer.sha256 ; then
echo "Hash for static_viewer.html differs, please update .static_viewer.sha256"
fi
1 change: 1 addition & 0 deletions .static_viewer.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b757777855acdc69644186c0678fb8f15cd28614fc96454e567ee81ae57ff3be ./trame_vtk/tools/static_viewer.html

0 comments on commit eb8461a

Please sign in to comment.