-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.sh
46 lines (37 loc) · 965 Bytes
/
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
#!/bin/bash
export ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function main() {
local default_gradle_version="gradle-4.10.2-all"
local docker_tag
if [[ -z "${DOCKER_TAG}" ]]; then
docker_tag="${default_gradle_version}"
else
docker_tag="${DOCKER_TAG}"
fi
echo "default_docker_tag=${docker_tag}"
case $docker_tag in
gradle- )
## ignore
;;
* )
docker_tag="${default_gradle_version}"
;;
esac
export GRADLE_VERSION="${docker_tag}"
echo "GRADLE_VERSION=${GRADLE_VERSION}"
if [[ -z "${DOCKER_TAG}" ]]; then
export DOCKER_TAG="${GRADLE_VERSION}"
fi
echo "DOCKER_TAG=${DOCKER_TAG}"
if [[ -z "${DOCKER_REPO}" ]]; then
export DOCKER_REPO="evovetech/android"
fi
if [[ -z "${DOCKERFILE_PATH}" ]]; then
export DOCKERFILE_PATH="${ROOT_DIR}/Dockerfile"
fi
if [[ -z "${IMAGE_NAME}" ]]; then
export IMAGE_NAME="${DOCKER_REPO}:${DOCKER_TAG}"
fi
}
# RUN
main "$@"