mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-15 19:44:48 +00:00
rework building templates
This commit is contained in:
@@ -1,31 +1,25 @@
|
||||
#!/bin/bash
|
||||
cd "$(dirname $0)"/..
|
||||
cd "$(dirname "$0")"/..
|
||||
|
||||
DEFAULT=${1:-master}
|
||||
ROLLUP=${2:-rollup}
|
||||
WEBPACK=${3:-webpack}
|
||||
HEAD=$(git rev-parse HEAD)
|
||||
|
||||
echo "Creating $ROLLUP and $WEBPACK branches from $DEFAULT"
|
||||
ROLLUP=${1:-rollup}
|
||||
WEBPACK=${2:-webpack}
|
||||
|
||||
# make sure we're on master, and delete the $ROLLUP and $WEBPACK branches
|
||||
git symbolic-ref HEAD "refs/heads/$DEFAULT"
|
||||
git reset --hard
|
||||
git branch -D $ROLLUP $WEBPACK
|
||||
echo "Creating $ROLLUP and $WEBPACK branches from $REV"
|
||||
|
||||
# create the $ROLLUP branch off the current master
|
||||
git checkout -b $ROLLUP
|
||||
# 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 .travis.yml _template package_template.json webpack.config.js
|
||||
git rm -r --cached .github _template package_template.json webpack.config.js
|
||||
git add package.json
|
||||
git commit -m 'Sapper template for Rollup'
|
||||
git symbolic-ref HEAD "refs/heads/$DEFAULT"
|
||||
git reset --hard
|
||||
|
||||
# create the $WEBPACK branch off the current master
|
||||
git checkout -b $WEBPACK
|
||||
# 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 .travis.yml _template package_template.json rollup.config.js
|
||||
git rm -r --cached .github _template package_template.json rollup.config.js
|
||||
git add package.json
|
||||
git commit -m 'Sapper template for webpack'
|
||||
git symbolic-ref HEAD "refs/heads/$DEFAULT"
|
||||
git reset --hard
|
||||
Reference in New Issue
Block a user