-
Notifications
You must be signed in to change notification settings - Fork 15
/
config.yml
57 lines (57 loc) · 2.5 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: 2.1
orbs:
aws-s3: circleci/[email protected]
jobs:
build:
docker:
- image: circleci/node:lts-stretch
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: false
- run:
name: Set the GIT_HASH env var for use in later steps
command: |
echo "Set GIT_HASH to `git log -1 --pretty=%h`"
echo 'export GIT_HASH=`git log -1 --pretty=%h`' >> $BASH_ENV
- run:
name: Install the dependencies
command: |
npm install --production
cd ./node_modules/scratch-gui
npm install
npm install [email protected]
- run:
name: Install the custom Ethereum extensions
command: |
cp ./scratch/gui/index.jsx ./node_modules/scratch-gui/src/lib/libraries/extensions/index.jsx
# remove the other extension examples - especially the music extensions with large mp3 files
rm -r ./node_modules/scratch-gui/node_modules/scratch-vm/src/extensions/*
cp -R ./scratch/extensions ./node_modules/scratch-gui/node_modules/scratch-vm/src/extensions/custom
# the following is a symbolic link to ../../build/contracts which will not work for this build
rm ./node_modules/scratch-gui/node_modules/scratch-vm/src/extensions/custom/contracts
cp -R ./build/contracts ./node_modules/scratch-gui/node_modules/scratch-vm/src/extensions/custom/contracts
cp ./scratch/vm/extension-manager.js ./node_modules/scratch-gui/node_modules/scratch-vm/src/extension-support/extension-manager.js
- run:
name: Build the Scratch React app
command: |
cd ./node_modules/scratch-gui
npx webpack --progress --colors --bail
- run:
name: Install Python dependency for AWS CLI
command: sudo apt-get install python-dev
- aws-s3/sync:
from: ./node_modules/scratch-gui/build
to: 's3://scratch.addisonbrown.com.au/'
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
aws-region: AWS_REGION
# arguments: |
# --acl public-read \
# --cache-control "max-age=86400"
overwrite: true
- run:
name: Clear CloudFront
command: |
echo "AWS_CLOUDFRONT_DISTRIBUTION_ID set to $AWS_CLOUDFRONT_DISTRIBUTION_ID"
aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID --paths "/*"