Skip to content

Commit f561678

Browse files
authored
Merge pull request #42 from LLK/circleci
Switch to CircleCI
2 parents 16d5ff0 + 2e4d727 commit f561678

File tree

4 files changed

+7370
-59
lines changed

4 files changed

+7370
-59
lines changed

.circleci/config.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: 2.1
2+
orbs:
3+
node: circleci/node@5
4+
commands:
5+
deploy_npm:
6+
steps:
7+
- run:
8+
# This assumes the git user info is already configured
9+
name: Deploy to NPM
10+
command: |
11+
export RELEASE_VERSION="0.11.$(date +%Y%m%d%H%M%S)"
12+
if [[ "$CIRCLE_BRANCH" == hotfix/* ]]; then
13+
export NPM_TAG=hotfix
14+
else
15+
export NPM_TAG=latest
16+
fi
17+
echo "Deploying version $RELEASE_VERSION to $NPM_TAG"
18+
npm --no-git-tag-version version $RELEASE_VERSION
19+
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
20+
npm publish --tag $NPM_TAG
21+
if npm info | grep -q $RELEASE_VERSION; then
22+
git tag $RELEASE_VERSION
23+
git push \
24+
https://${GH_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git \
25+
$RELEASE_VERSION
26+
fi
27+
28+
jobs:
29+
default:
30+
docker:
31+
- image: circleci/node:10-browsers # TODO: switch to cimg/node:* after upgrading gulp
32+
steps:
33+
- checkout
34+
- run: git submodule update --init --recursive
35+
- run:
36+
name: Setup
37+
command: |
38+
sudo apt update
39+
sudo apt install libgif-dev
40+
TRAVIS_BRANCH="${CIRCLECI_BRANCH}" travis/setup-git.sh # Configure git user info
41+
travis/install-assets.sh
42+
npm set progress=false
43+
which gulp || sudo npm install -g gulp-cli
44+
- node/install-packages
45+
- run: gulp jshint
46+
- run: gulp minify
47+
- run: gulp test
48+
- run: gulp zip
49+
- when:
50+
condition:
51+
or:
52+
- equal: [ master, <<pipeline.git.branch>> ]
53+
- equal: [ develop, <<pipeline.git.branch>> ]
54+
- matches: { pattern: "^hotfix.*", value: <<pipeline.git.branch>> }
55+
- matches: { pattern: "^release.*", value: <<pipeline.git.branch>> }
56+
steps:
57+
- run:
58+
name: travis/deploy-prebuilt.sh
59+
command: |
60+
TRAVIS_TAG="${CIRCLE_TAG}" TRAVIS_COMMIT="${CIRCLE_SHA1}" travis/deploy-prebuilt.sh
61+
- deploy_npm
62+
workflows:
63+
version: 2
64+
default:
65+
jobs:
66+
- default:
67+
context:
68+
- dockerhub-credentials
69+
- scratch-npm-creds

.travis.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting [![Build Status](https://travis-ci.org/paperjs/paper.js.svg?branch=develop)](https://travis-ci.org/paperjs/paper.js) [![NPM](https://img.shields.io/npm/v/paper.svg)](https://www.npmjs.com/package/paper)
1+
# Scratch's fork of Paper.js [![Build Status](https://circleci.com/gh/LLK/paper.js.svg?style=shield)](https://app.circleci.com/pipelines/github/LLK/paper.js?branch=develop) [![NPM](https://img.shields.io/npm/v/@scratch/paper.svg)](https://www.npmjs.com/package/@scratch/paper)
2+
3+
This is a fork of Paper.js for use in Scratch. Please do not contact the Paper.js authors to support this fork.
4+
5+
_Original README.md below_
6+
7+
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting
28

39
If you want to work with Paper.js, simply download the latest "stable" version
410
from [http://paperjs.org/download/](http://paperjs.org/download/)

0 commit comments

Comments
 (0)