Files
sapper-template/_template/create-branches.sh
2019-09-26 04:49:31 -04:00

26 lines
747 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"/..
HEAD=$(git rev-parse HEAD)
ROLLUP=${1:-rollup}
WEBPACK=${2:-webpack}
echo "Creating $ROLLUP and $WEBPACK branches from $REV"
# create the $ROLLUP branch off the current HEAD
git symbolic-ref HEAD refs/heads/$ROLLUP
git reset $HEAD --hard
node _template/build-pkg.js rollup
git rm -r --cached .github _template package_template.json webpack.config.js
git add package.json
git commit -m 'Sapper template for Rollup'
# create the $WEBPACK branch off the current HEAD
git symbolic-ref HEAD refs/heads/$WEBPACK
git reset $HEAD --hard
node _template/build-pkg.js webpack
git rm -r --cached .github _template package_template.json rollup.config.js
git add package.json
git commit -m 'Sapper template for webpack'