forked from Azure/azure-saas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·36 lines (28 loc) · 1.04 KB
/
setup.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
#!/usr/bin/env bash
skip_docker_build=false
force_update=false
while getopts 'sf' flag; do
case "${flag}" in
s) skip_docker_build=true ;;
f) force_update=true ;;
*) skip_docker_build=false ;;
esac
done
# shellcheck disable=SC1091
source "../constants.sh"
echo "Setting up the SaaS Signup Administration Web App Act deployment environment."
echo "Settings execute permissions on necessary scripts files."
sudo mkdir -p "${ACT_SECRETS_DIR}"
sudo touch ${ACT_SECRETS_FILE}
sudo chown "${USER}" ${ACT_SECRETS_FILE}
sudo touch ${ACT_SECRETS_FILE_RG}
sudo chown "${USER}" ${ACT_SECRETS_FILE_RG}
if [ "${skip_docker_build}" = false ]; then
echo "Building the deployment container."
if [[ "${force_update}" == false ]]; then
"${ACT_CONTAINER_DIR}"/build.sh -n "${ACT_CONTAINER_NAME}"
else
"${ACT_CONTAINER_DIR}"/build.sh -n "${ACT_CONTAINER_NAME}" -f
fi
fi
echo "SaaS SaaS Signup Administration Web App Act environment setup complete. You can now run the local deployment script using the command './deploy.sh'."