-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuildspec.yml
More file actions
47 lines (46 loc) · 1.5 KB
/
buildspec.yml
File metadata and controls
47 lines (46 loc) · 1.5 KB
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
version: 0.2
phases:
install:
runtime-versions:
nodejs: 12
commands:
- echo Installing source NPM dependencies...
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- apt-get update -y
- apt-get install -y apt-transport-https
- npm install forever -g
- npm install -g @angular/cli
- npm install
build:
commands:
- echo Build started on `date`
- cat /dev/null > src/environments/environment.ts
- sed -i "s/<CUSTOM_PIWIK_ENVIRONEMENT>/$CUSTOM_PIWIK_ENVIRONEMENT/" src/index.html
- sed -i "s/<SHA256_KEYSTORE_CERT_FINGERPRINTS>/$SHA256_KEYSTORE_CERT_FINGERPRINTS/" src/well-known/assetlinks.json
- chmod +x ./env.sh
- ./env.sh
# - while IFS='=' read -r name value ; do if [[ $name == 'FILESTACK_'* ]]; then sed -i "s#<$name>#${!name}#g" src/environments/filestack.ts; fi; done < <(env)
- ng build --configuration=$BUILD_CONFIG
- npm run generate-version
- cp -R src/well-known www/.well-known/
post_build:
commands:
- aws s3 sync www/ s3://$S3_BUCKET/ --delete
- for i in $CF_DIST_ID;do aws cloudfront create-invalidation --distribution-id $i --paths '/*';done
- echo Build completed on `date`
artifacts:
type: zip
files:
- template.yml
- README.md
- package.json
- package-lock.json
- tsconfig.json
- tslint.json
- angular.json
- ionic.config.json
- appspec.yml
- scripts/*
- src/**/*
- www/**/*
- node_modules/**/*