2016-02-25 02:41:30 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2016-11-02 19:38:11 +08:00
|
|
|
if [ $# -eq 1 ]; then
|
|
|
|
version=$1
|
|
|
|
else
|
|
|
|
version=`git describe --dirty --tags || echo unknown`
|
|
|
|
fi
|
2016-02-25 02:41:30 +08:00
|
|
|
|
|
|
|
npm run build
|
2016-11-01 23:22:06 +08:00
|
|
|
mkdir -p dist
|
2016-02-25 02:59:33 +08:00
|
|
|
cp -r vector vector-$version
|
|
|
|
echo $version > vector-$version/version
|
2016-11-01 23:22:06 +08:00
|
|
|
tar chvzf dist/vector-$version.tar.gz vector-$version
|
2016-02-25 02:59:33 +08:00
|
|
|
rm -r vector-$version
|
2016-02-25 02:41:30 +08:00
|
|
|
|
|
|
|
echo
|
2016-11-01 23:22:06 +08:00
|
|
|
echo "Packaged dist/vector-$version.tar.gz"
|