Skip to content

Commit

Permalink
build: update publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
LastLeaf committed Dec 26, 2024
1 parent 67cd817 commit ff36dc3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deprecate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ for PROJECT in $PROJECTS; do
echo "Deprecating ${PROJECT}..."
cargo yank --version "${VERSION}" "${PROJECT}"
done

# npm deprecate
npm deprecate "float-pigment-css@${VERSION}" --registry https://registry.npmjs.org -m "sync with cargo yank"
14 changes: 14 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ else
exit -1
fi

# run wasm-pack
if wasm-pack build float-pigment-css --target nodejs --features nodejs-package; then
echo 'WebAssembly built for float-pigment-css.'
else
echo 'Failed to build WebAssembly package for float-pigment-css! Abort.'
exit -1
fi

# git operations
if [ -z "$(git status --porcelain)" ]; then
echo 'Git status OK.'
Expand Down Expand Up @@ -113,3 +121,9 @@ for PROJECT in $PROJECTS; do
echo "Publishing ${PROJECT}..."
cargo publish -p "${PROJECT}"
done

# npm publish
cd float-pigment-css/pkg
echo "Publishing NPM package for float-pigment-css..."
npm publish --registry https://registry.npmjs.org
cd ../..

0 comments on commit ff36dc3

Please sign in to comment.