mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-11 18:14:27 +00:00
rework building templates
This commit is contained in:
18
.github/workflows/build-templates.yml
vendored
Normal file
18
.github/workflows/build-templates.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: Create templates
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
-
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
SSH_KEY: ${{ secrets.SSH_KEY }}
|
||||||
|
SSH_KEY_ROLLUP: ${{ secrets.SSH_KEY_ROLLUP }}
|
||||||
|
SSH_KEY_WEBPACK: ${{ secrets.SSH_KEY_WEBPACK }}
|
||||||
|
run: _template/build.sh
|
||||||
11
.travis.yml
11
.travis.yml
@@ -1,11 +0,0 @@
|
|||||||
sudo: false
|
|
||||||
language: node_js
|
|
||||||
node_js:
|
|
||||||
- "stable"
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- BUILD_TIMEOUT=10000
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script: _template/build.sh
|
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
if [ "$CI" ]; then
|
if [ "$CI" ]; then
|
||||||
# write out SSH key
|
(umask 0077; echo "$SSH_KEY" > ~/ssh_key; echo "$SSH_KEY_ROLLUP" > ~/ssh_key_rollup; echo "$SSH_KEY_WEBPACK" > ~/ssh_key_webpack)
|
||||||
[ "$SSH_KEY" ] || exit 1
|
git config user.email 'noreply@svelte.dev'
|
||||||
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
git config user.name '[bot]'
|
||||||
chmod 600 ~/.ssh/id_rsa
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# branch names
|
# branch names
|
||||||
DEFAULT=master
|
|
||||||
ROLLUP=rollup
|
ROLLUP=rollup
|
||||||
WEBPACK=webpack
|
WEBPACK=webpack
|
||||||
|
|
||||||
./create-branches.sh $DEFAULT $ROLLUP $WEBPACK
|
./create-branches.sh $ROLLUP $WEBPACK
|
||||||
|
|
||||||
# force push rollup and webpack branches
|
# force push rollup and webpack branches and repos
|
||||||
git push git@github.com:sveltejs/sapper-template.git $ROLLUP $WEBPACK -f
|
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key' git push git@github.com:sveltejs/sapper-template.git $ROLLUP $WEBPACK -f
|
||||||
|
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key_rollup' git push git@github.com:sveltejs/sapper-template-rollup.git $ROLLUP:master -f
|
||||||
|
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key_webpack' git push git@github.com:sveltejs/sapper-template-webpack.git $WEBPACK:master -f
|
||||||
|
|||||||
@@ -1,31 +1,25 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname $0)"/..
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
DEFAULT=${1:-master}
|
HEAD=$(git rev-parse HEAD)
|
||||||
ROLLUP=${2:-rollup}
|
|
||||||
WEBPACK=${3:-webpack}
|
|
||||||
|
|
||||||
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
|
echo "Creating $ROLLUP and $WEBPACK branches from $REV"
|
||||||
git symbolic-ref HEAD "refs/heads/$DEFAULT"
|
|
||||||
git reset --hard
|
|
||||||
git branch -D $ROLLUP $WEBPACK
|
|
||||||
|
|
||||||
# create the $ROLLUP branch off the current master
|
# create the $ROLLUP branch off the current HEAD
|
||||||
git checkout -b $ROLLUP
|
git symbolic-ref HEAD refs/heads/$ROLLUP
|
||||||
|
git reset $HEAD --hard
|
||||||
node _template/build-pkg.js rollup
|
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 add package.json
|
||||||
git commit -m 'Sapper template for Rollup'
|
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
|
# create the $WEBPACK branch off the current HEAD
|
||||||
git checkout -b $WEBPACK
|
git symbolic-ref HEAD refs/heads/$WEBPACK
|
||||||
|
git reset $HEAD --hard
|
||||||
node _template/build-pkg.js webpack
|
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 add package.json
|
||||||
git commit -m 'Sapper template for webpack'
|
git commit -m 'Sapper template for webpack'
|
||||||
git symbolic-ref HEAD "refs/heads/$DEFAULT"
|
|
||||||
git reset --hard
|
|
||||||
18
appveyor.yml
18
appveyor.yml
@@ -1,18 +0,0 @@
|
|||||||
version: "{build}"
|
|
||||||
|
|
||||||
shallow_clone: true
|
|
||||||
|
|
||||||
init:
|
|
||||||
- git config --global core.autocrlf false
|
|
||||||
|
|
||||||
build: off
|
|
||||||
|
|
||||||
environment:
|
|
||||||
matrix:
|
|
||||||
# node.js
|
|
||||||
- nodejs_version: stable
|
|
||||||
|
|
||||||
install:
|
|
||||||
- ps: Install-Product node $env:nodejs_version
|
|
||||||
- npm install cypress
|
|
||||||
- npm install
|
|
||||||
Reference in New Issue
Block a user