-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
38 lines (34 loc) · 1.3 KB
/
circle.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
machine:
node:
version: 4.1.1
environment:
S3_BUCKET: redsift-static
checkout:
post:
- git fetch --tags
- npm install
pre:
- sudo pip install awscli
dependencies:
override:
- npm run build
- mv ./dist ${CIRCLE_ARTIFACTS}/dist
test:
override:
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/css/core/redsift-light.min.css ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/css/sift/redsift-light.min.css ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/css/full/redsift-light.min.css ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/js/core/redsift.umd-es2015.min.js ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/js/sift/redsift.umd-es2015.min.js ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/js/full/redsift.umd-es2015.min.js ]"
- /bin/bash -c "[ -s ${CIRCLE_ARTIFACTS}/dist/js/crx/redsift.umd-es2015.min.js ]"
deployment:
production:
branch: /release-.*/
commands:
- echo "Uploading to S3 bucket..."
- aws s3 cp ${CIRCLE_ARTIFACTS}/dist s3://$S3_BUCKET/ui/latest --recursive --acl public-read
- |
VERSION=$(git describe --exact-match --tags 2>/dev/null || git rev-parse --short HEAD)
aws s3 cp ${CIRCLE_ARTIFACTS}/dist s3://$S3_BUCKET/ui/$VERSION --recursive --acl public-read
- echo "S3 upload complete."