-
Notifications
You must be signed in to change notification settings - Fork 3
/
env.sh
66 lines (57 loc) · 2.18 KB
/
env.sh
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
58
59
60
61
62
63
64
65
66
#!/bin/bash
if [ "$TRAVIS_BRANCH" = "uat" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-uat.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "nft" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-NFT.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "pre-production" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-pre-production.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "sandbox" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-sandbox.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "testing" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-testing.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "production" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-production.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi
if [ "$TRAVIS_BRANCH" = "development" ]
then
IDAM=$IDAM_ID
ROLLBAR=$ROLLBAR
GTM=$GTM
BUCKET_URL=$BUCKET_URL
sed "s/IDAM_ID/$IDAM_ID/g" src/environments/environment-development.ts | sed "s/ROLLBAR/$ROLLBAR/g" | sed "s/GTM/$GTM/g" | sed "s|BUCKET_URL|$BUCKET_URL|g" > src/environments/environment.ts
fi