-
Notifications
You must be signed in to change notification settings - Fork 7
/
deploy.sh
44 lines (35 loc) · 814 Bytes
/
deploy.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
#!/bin/bash
# Edit this script to define how you want to deploy to your environments.
# The below script content acts as for reference
let DEV="dev"
let STAGING="staging"
let PRODUCTION="production"
usage(){
echo "Usage: $0 [environment]"
exit 1
}
if [ $# -ne 1 ]
then
usage
else
environment=$1
fi
echo "Deploying to ${environment} environment"
if [ "$environment" = $DEV ]
then
# steps to deploy to 'dev' environment
echo "Steps to deploy to Dev environment"
exit 0
fi
if [ "$environment" = $STAGING ]
then
# steps to deploy to 'staging' environment
echo "Steps to deploy to Staging environment"
exit 0
fi
if [ "$environment" = $PRODUCTION ]
then
# steps to deploy to 'production' environment
echo "Steps to deploy to Production environment"
exit 0
fi