From 01b4b610ed056cd2130155a204802e571330e08f Mon Sep 17 00:00:00 2001 From: Yotam Mann Date: Sat, 19 May 2018 16:09:54 -0400 Subject: [PATCH] website and build are handled in their own repos --- .travis.yml | 10 +-------- gulp/push_build.sh | 51 --------------------------------------------- gulp/update_site.sh | 18 ---------------- gulp/version.js | 7 ------- 4 files changed, 1 insertion(+), 85 deletions(-) delete mode 100755 gulp/push_build.sh delete mode 100755 gulp/update_site.sh delete mode 100755 gulp/version.js diff --git a/.travis.yml b/.travis.yml index 1e22ae90..ad018a01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,15 +11,7 @@ install: script: - npm run test:travis - npm run coveralls -before_deploy: -- cd gulp -- npm install -g jsdoc -# commit the build -- sh push_build.sh -# update the site -- sh update_site.sh -- node increment_version.js -- cd ../ +before_deploy: npm run increment jobs: include: - stage: test diff --git a/gulp/push_build.sh b/gulp/push_build.sh deleted file mode 100755 index 65ae3fa4..00000000 --- a/gulp/push_build.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -TMP_DIR=$(pwd)/tmp -mkdir $TMP_DIR - -TONE_DIR=$(pwd)/.. - -BUILD_DIR=$TMP_DIR/build - -# clone the build repo -if [ "$TRAVIS" = "true" ]; then - GITHUB_USER=${GH_TOKEN}@ -fi - -git clone https://${GITHUB_USER}github.com/Tonejs/build $BUILD_DIR > /dev/null 2>&1 -cd $BUILD_DIR -git checkout gh-pages - -# generate a new build -gulp build - - -# push to the appropriate location -if [ "$TRAVIS" = "true" ]; then - - - if [ "$TRAVIS_BRANCH" = "dev" ]; then - - # dev builds go into the dev folder - cp -a $TONE_DIR/build/. $BUILD_DIR/dev/ - - elif [ "$TRAVIS_BRANCH" = "master" ]; then - - # master builds are on the root level folder - cp -a $TONE_DIR/build/. $BUILD_DIR/ - - # and also in a folder with the version name - VERSION=$(node $TONE_DIR/gulp/version.js $TONE_DIR) - mkdir $BUILD_DIR/$VERSION - cp -a $TONE_DIR/build/. $BUILD_DIR/$VERSION - - fi - -fi - -# push the build -git add . -git commit -m "build #$TRAVIS_BUILD_NUMBER: $TRAVIS_COMMIT_MESSAGE" -git push -f - -rm -rf $TMP_DIR diff --git a/gulp/update_site.sh b/gulp/update_site.sh deleted file mode 100755 index 48a6f8e3..00000000 --- a/gulp/update_site.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -TMP_DIR=$(pwd)/tmp/ -mkdir $TMP_DIR -SITE_DIR=$TMP_DIR/Site - -# clone the tonejs.github.io site -if [ "$TRAVIS" = "true" ]; then - GITHUB_USER=${GH_TOKEN}@ -fi - -git clone https://${GITHUB_USER}github.com/Tonejs/tonejs.github.io $SITE_DIR > /dev/null 2>&1 - -cd $SITE_DIR -# run the update script -sh update.sh - -rm -rf $TMP_DIR diff --git a/gulp/version.js b/gulp/version.js deleted file mode 100755 index 9cd533cc..00000000 --- a/gulp/version.js +++ /dev/null @@ -1,7 +0,0 @@ -const fs = require('fs') - - -var VERSION = fs.readFileSync(`${process.argv[2]}/Tone/core/Tone.js`, 'utf-8') - .match(/(?:Tone\.version\s*=\s*)(?:'|")(.*)(?:'|");/m)[1]; - -console.log(VERSION)