2016-02-23 12:35:32 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -x
|
2016-04-30 23:41:54 +03:00
|
|
|
# copy old releases
|
2016-04-30 22:18:11 +03:00
|
|
|
mkdir -p .ghpages-tmp && cd .ghpages-tmp
|
2016-04-30 23:41:54 +03:00
|
|
|
# reset local changes before checkout
|
|
|
|
git reset --hard
|
|
|
|
git fetch origin gh-pages:gh-pages
|
2016-04-30 22:18:11 +03:00
|
|
|
git checkout gh-pages
|
|
|
|
cp -R ../releases/* .
|
|
|
|
git checkout master
|
|
|
|
cd -
|
2016-04-30 23:41:54 +03:00
|
|
|
|
|
|
|
# build
|
2016-04-30 22:18:11 +03:00
|
|
|
gulp build
|
2016-02-23 12:35:32 +03:00
|
|
|
cd demo
|
|
|
|
cp -R ../dist ./dist
|
2016-04-30 22:18:11 +03:00
|
|
|
mkdir -p releases
|
|
|
|
cp -R ../.ghpages-tmp/* ./releases/
|
2016-02-23 12:35:32 +03:00
|
|
|
cd -
|
2016-04-30 22:18:11 +03:00
|
|
|
gulp copy-version
|