forked from mendix/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·31 lines (26 loc) · 790 Bytes
/
Copy pathdeploy.sh
File metadata and controls
executable file
·31 lines (26 loc) · 790 Bytes
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
#!/bin/bash
set -ev
# TRAVIS_PULL_REQUEST is either the PR number or "false"
if ([ "${TRAVIS_PULL_REQUEST}" != "false" ])
then
echo 'Pull request, not deploying'
exit 0
fi
if ([ "${TRAVIS_BRANCH}" == "development" ])
then
echo 'Deploying development to AWS'
TARGETAWSBUCKET="mendixtestdocumentation"
chmod +x $TRAVIS_BUILD_DIR/_scripts/aws_deploy.sh
source $TRAVIS_BUILD_DIR/_scripts/aws_deploy.sh # source ensures that script can read TARGETAWSBUCKET
exit 0
fi
if ([ "${TRAVIS_BRANCH}" == "master" ])
then
echo 'Deploying master to AWS'
TARGETAWSBUCKET="docs.mendix.com"
chmod +x $TRAVIS_BUILD_DIR/_scripts/aws_deploy.sh
source $TRAVIS_BUILD_DIR/_scripts/aws_deploy.sh # source ensures that script can read TARGETAWSBUCKET
exit 0
fi
echo 'Not deployed'
exit 0