@@ -4,40 +4,40 @@ aliases:
44 save_cache :
55 paths :
66 - .git
7- key : v1 -git-{{ .Revision }}
7+ key : v3 -git-{{ .Revision }}
88 - &restore_git_cache
99 restore_cache :
1010 keys :
11- - v1 -git-{{ .Revision }}
12- - v1 -git-
11+ - v3 -git-{{ .Revision }}
12+ - v3 -git-
1313 - &save_build_cache
1414 save_cache :
1515 paths :
1616 - build
17- key : v1 -build-{{ .Revision }}
17+ key : v3 -build-{{ .Revision }}
1818 - &restore_build_cache
1919 restore_cache :
2020 keys :
21- - v1 -build-{{ .Revision }}
21+ - v3 -build-{{ .Revision }}
2222 - &save_dist_cache
2323 save_cache :
2424 paths :
2525 - dist
26- key : v1 -dist-{{ .Revision }}
26+ key : v3 -dist-{{ .Revision }}
2727 - &restore_dist_cache
2828 restore_cache :
2929 keys :
30- - v1 -dist-{{ .Revision }}
30+ - v3 -dist-{{ .Revision }}
3131 - &save_npm_cache
3232 save_cache :
3333 paths :
3434 - node_modules
35- key : v1 -npm-{{ checksum "package-lock.json" }}
35+ key : v3 -npm-{{ checksum "package-lock.json" }}
3636 - &restore_npm_cache
3737 restore_cache :
3838 keys :
39- - v1 -npm-{{ checksum "package-lock.json" }}
40- - v1 -npm-
39+ - v3 -npm-{{ checksum "package-lock.json" }}
40+ - v3 -npm-
4141 - &defaults
4242 docker :
4343 - image : circleci/node:10-browsers
5050 - *restore_git_cache
5151 - checkout
5252 - *restore_npm_cache
53- - run : npm install
53+ - run : |
54+ rm -rf node_modules/scratch-vm
55+ npm install
56+ (cd node_modules/scratch-vm && npm install && $(npm bin)/webpack --colors --bail --silent)
5457 - *save_git_cache
5558 - *save_npm_cache
5659 lint :
@@ -127,30 +130,6 @@ jobs:
127130 - store_test_results :
128131 path : test-results
129132
130- deploy-npm :
131- << : *defaults
132- environment :
133- NODE_OPTIONS : --max-old-space-size=4000
134- steps :
135- - *restore_git_cache
136- - *restore_dist_cache
137- - checkout
138- - run : |
139- echo export RELEASE_VERSION="0.1.0-prerelease.$(date +'%Y%m%d%H%M%S')" >> $BASH_ENV
140- echo export NPM_TAG=circlelatest >> $BASH_ENV
141- if [ "$CIRCLE_BRANCH" == "master" ]
142- then echo export NPM_TAG=circlestable >> $BASH_ENV
143- fi
144- if [[ "$CIRCLE_BRANCH" == hotfix/* ]] # double brackets are important for matching the wildcard
145- then echo export NPM_TAG=circlehotfix >> $BASH_ENV
146- fi
147- - run : npm version --no-git-tag-version $RELEASE_VERSION
148- - run : |
149- npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
150- npm publish --tag $NPM_TAG
151- - run : git tag $RELEASE_VERSION
152- - run : git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION
153-
154133 deploy-gh-pages :
155134 << : *defaults
156135 steps :
@@ -161,7 +140,8 @@ jobs:
161140 - run : |
162141 git config --global user.email $(git log --pretty=format:"%ae" -n1)
163142 git config --global user.name $(git log --pretty=format:"%an" -n1)
164- - run : npm run deploy -- -e $CIRCLE_BRANCH
143+ - run : npm run deploy -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git
144+ - run : npm run deploy:smalruby.app -- -x -r https://${GH_TOKEN}@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git
165145
166146workflows :
167147 version : 2
@@ -186,7 +166,7 @@ workflows:
186166 - store_dist :
187167 requires :
188168 - build
189- - deploy-npm :
169+ - deploy-gh-pages :
190170 requires :
191171 - lint
192172 - unit
@@ -195,16 +175,4 @@ workflows:
195175 filters :
196176 branches :
197177 only :
198- - master
199178 - develop
200- - /^hotfix\/.*/
201- # - deploy-gh-pages:
202- # requires:
203- # - lint
204- # - unit
205- # - integration
206- # - build
207- # filters:
208- # branches:
209- # ignore:
210- # - ^dependabot/.*/
0 commit comments