forked from privacybydesign/yivi-frontend-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·33 lines (26 loc) · 891 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
set -euxo pipefail
# Find all package.json files in subdirectories, except node_modules, examples, yivi-popup and yivi-frontend
standalone_packages=`find . -mindepth 2 -name "package.json" -not -path "*/node_modules/*" -not -path "*/examples/*" -not -path "*/yivi-popup/*" -not -path "*/yivi-frontend/*"`
set +x
echo ""
echo "Are you sure you want to release a new version of the following packages?"
for package in ${standalone_packages[@]}; do
echo " - `dirname $package`"
done
read -p "(Enter y/n) "
set -x
if [[ $REPLY =~ ^[Yy]$ ]]
then
root=`pwd`
for package in ${standalone_packages[@]}; do
cd `dirname $package`
echo "Releasing $package"
npm publish --access public
cd $root
done
set +x
echo ""
echo "Releasing done."
echo "Don't forget releasing the 'yivi-frontend' package separately. Please check the README for more details."
fi