mirror of
https://github.com/Instadapp/vue-web3.git
synced 2024-07-29 21:48:25 +00:00
32 lines
671 B
Bash
Executable File
32 lines
671 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Restore all git changes
|
|
git restore -s@ -SW -- src
|
|
|
|
# Resolve yarn
|
|
yarn
|
|
|
|
# Update token
|
|
if [[ ! -z ${NODE_AUTH_TOKEN} ]] ; then
|
|
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
|
|
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
|
|
echo "always-auth=true" >> ~/.npmrc
|
|
npm whoami
|
|
fi
|
|
|
|
# Get package name from package.json
|
|
PACKAGE_NAME=$(
|
|
cat package.json \
|
|
| grep name \
|
|
| head -1 \
|
|
| awk -F: '{ print $2 }' \
|
|
| sed 's/[",]//g'
|
|
)
|
|
|
|
# Release package
|
|
echo "🚀 Publishing$PACKAGE_NAME"
|
|
if npm publish -q --access public ; then
|
|
echo "✅ Published$PACKAGE_NAME"
|
|
else
|
|
echo "❌ Could'nt publish$PACKAGE_NAME"
|
|
fi |