-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec_dev.yaml
32 lines (29 loc) · 1.15 KB
/
buildspec_dev.yaml
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
version: 0.2
env:
secrets-manager:
NPM_TOKEN: arn:aws:secretsmanager:us-west-2:205830496597:secret:dev/npmjs/token-oL0xXe
phases:
install:
commands:
- cd packages/cdn/
- PACKAGE_VERSION=$(npm run display-version --silent)
- echo Set PACKAGE_VERSION to $PACKAGE_VERSION
- cd ../..
- echo Setting NPM token
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
- echo Installing...
- npm install -g [email protected]
- npm ci
build:
commands:
- echo Building...
- npm run build
- echo Running tests...
- npm run test
post_build:
commands:
- echo Copying to S3
- aws s3 cp packages/cdn/dist/browser/appfit.js s3://appfit-dev-cdn-storage/browser-sdk/appfit-v1-browser.js
- aws s3 cp packages/cdn/dist/legacy-browser/appfit-legacy.js s3://appfit-dev-cdn-storage/browser-sdk/appfit-v1-legacy.js
- aws s3 cp packages/cdn/dist/browser/appfit.js s3://appfit-dev-cdn-storage/browser-sdk/appfit-v$PACKAGE_VERSION.js
- aws s3 cp packages/cdn/dist/legacy-browser/appfit-legacy.js s3://appfit-dev-cdn-storage/browser-sdk/appfit-legacy-v$PACKAGE_VERSION.js