Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ demo/train-*
.nyc_output/
coverage/
.DS_Store
tensorflow-tfjs-node*.tgz
12 changes: 12 additions & 0 deletions scripts/publish-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ fi

yarn build-npm
./scripts/make-version # This is for safety in case you forgot to do 2).

GPU_TARBALLS=$(ls tensorflow-tfjs-node-gpu*.tgz)
GPU_TARBALL_COUNT=$(echo $GPU_TARBALLS | wc -w | xargs)
if [ "$GPU_TARBALL_COUNT" != "1" ]; then
echo "Error: Please make sure there is exactly one GPU tarball, found:"
echo $GPU_TARBALLS
exit
fi

# Publish the CPU package
npm publish
# Publish the GPU package
echo $GPU_TARBALLS | xargs npm publish
./scripts/tag-version
echo 'Yay! Published a new package to npm.'