forked from baconjs/bacon.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release
executable file
·41 lines (30 loc) · 677 Bytes
/
release
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
#!/usr/bin/env bash -e
if [ -z $1 ]; then
echo "usage: release <version>"
exit 1
fi
version=$1
files="component.json package.json bower.json"
echo "Releasing with version $version"
echo "Pulling from origin"
git pull --ff-only --no-rebase origin
echo "Building"
npm install
npm test
if [ -z $2 ] ; then
node ./test-individually.js
fi
./build
echo "Updating files"
sed -i "" 's/\("version".*:.*\)".*"/\1"'$version'"/' $files
sed -i "" 's/<version>/'$version'/' dist/*.js
echo "Commit and tag"
git add .
git commit -m "release $version"
git tag $version
echo "Push to origin/master"
git push
git push --tags origin
echo "Publish to npm"
npm publish
echo "DONE!"