forked from dpjanes/iotdb-smartthings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DIST.sh
42 lines (35 loc) · 750 Bytes
/
DIST.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
34
35
36
37
38
39
40
41
42
#
# DIST.sh
#
# David Janes
# IOTDB
# 2015-02-10
#
PACKAGE=iotdb-smartthings
DIST_ROOT=/var/tmp/.dist.$$
if [ ! -d "$DIST_ROOT" ]
then
mkdir "$DIST_ROOT"
fi
echo "=================="
echo "NPM Packge: $PACKAGE"
echo "=================="
(
NPM_DST="$DIST_ROOT/$PACKAGE"
echo "NPM_DST=$NPM_DST"
if [ -d ${NPM_DST} ]
then
rm -rf "${NPM_DST}"
fi
mkdir "${NPM_DST}" || exit 1
update-package --increment-version|| exit 1
tar cf - \
README.md \
LICENSE.txt \
package.json smartthings.js smartthingslib.js \
|
( cd "${NPM_DST}" && tar xvf - && npm publish ) || exit 1
git commit -m "new release" package.json || exit 1
git push || exit 1
echo "end"
)