mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-11 18:14:27 +00:00
26 lines
747 B
Bash
Executable File
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'
|