diff --git a/.circleci/config.yml b/.circleci/config.yml index 8bf013fa..10b944fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -55,7 +55,7 @@ commands: name: Deploy to NPM command: | export RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" - if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then + if [[ "$CIRCLE_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix else export NPM_TAG=latest diff --git a/.npmignore b/.npmignore index 795aaf6e..89433f5d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,10 +1,10 @@ # Development files +/.circleci .eslintrc /.editorconfig /.eslintignore /.gitattributes /.github -/.travis.yml /.tx /tests /webpack.config.js diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1c75a1e0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,51 +0,0 @@ -language: node_js -node_js: -- "12" -env: - global: - - NPM_TAG=latest - - RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" -addons: - chrome: stable -cache: - directories: - - node_modules - -before_install: -# Symlink closure library -- ln -s $(npm root)/google-closure-library ../closure-library - -before_script: - - export DISPLAY=:99.0 - - tests/scripts/setup_linux_env.sh - - sleep 2 -script: - - i18n/sync_translations.sh - - npm test -before_deploy: -- > - if [ -z "$BEFORE_DEPLOY_RAN" ]; then - npm --no-git-tag-version version $RELEASE_VERSION - if [[ "$TRAVIS_BRANCH" == hotfix/* ]]; then export NPM_TAG=hotfix; fi # double brackets are important for matching the wildcard - git config --global user.email $(git log --pretty=format:"%ae" -n1) - git config --global user.name $(git log --pretty=format:"%an" -n1) - export BEFORE_DEPLOY_RAN=true - fi -deploy: -- provider: npm - on: - branch: - - master - - develop - - hotfix/* - skip_cleanup: true - email: $NPM_EMAIL - api_key: $NPM_TOKEN - tag: $NPM_TAG -- provider: script - on: - all_branches: true - condition: $TRAVIS_EVENT_TYPE != cron && ! $TRAVIS_BRANCH =~ ^greenkeeper/ - tags: false # Don't push tags to gh-pages - skip_cleanup: true - script: npm run --silent deploy -- -x -r https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git diff --git a/README.md b/README.md index d84aabec..9f85a99e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # scratch-blocks #### Scratch Blocks is a library for building creative computing interfaces. -[](https://travis-ci.org/LLK/scratch-blocks) +[](https://dl.circleci.com/status-badge/redirect/gh/LLK/scratch-blocks/tree/develop) [](https://david-dm.org/LLK/scratch-blocks) [](https://david-dm.org/LLK/scratch-blocks#info=devDependencies) diff --git a/cleanup.sh b/cleanup.sh index a73573ae..8af8cf6a 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -81,7 +81,7 @@ echo Miscellaneous cleanup... keep_ours=".github/ISSUE_TEMPLATE.md \ .github/PULL_REQUEST_TEMPLATE.md \ .gitignore \ -.travis.yml \ +.circleci/config.yml \ core/block_animations.js \ msg/messages.js \ msg/js/en.js \ diff --git a/i18n/sync_translations.sh b/i18n/sync_translations.sh deleted file mode 100755 index f3b5a0d3..00000000 --- a/i18n/sync_translations.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] - then - echo "Starting translation sync" - set -ev - git checkout develop - # update translations, and test any updated messages - npm run translate - npm run translate:update - npm run test:messages - # stage any changes in the msg directory - git add ./msg - git commit -m '[skip ci] Update translations from transifex' - # add remote, make sure that API token doesn't end up in the log - git remote add origin-translation https://${GH_TOKEN}@github.com/LLK/scratch-blocks.git > /dev/null 2>&1 - git push --set-upstream origin-translation develop -fi diff --git a/tests/scripts/setup_linux_env.sh b/tests/scripts/setup_linux_env.sh deleted file mode 100755 index da3d0ce6..00000000 --- a/tests/scripts/setup_linux_env.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -if [ "${TRAVIS_OS_NAME}" == "linux" ] - then - export CHROME_BIN="/usr/bin/google-chrome" - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start & -fi