Récupération et chargement de variables locales via fichier .tamarinrc

This commit is contained in:
2016-04-18 15:14:38 +02:00
parent c1073a210e
commit b4ce2b696b
4 changed files with 24 additions and 21 deletions

12
package
View File

@ -16,7 +16,6 @@ function show_usage {
echo
echo " -p Path to the project to build"
echo " -a Optional : Target architecture (default amd64)"
echo " -o Optional : Default options file to load (default none)"
echo " -d Optional : Destination of the builed packages (default ./packages)"
echo " -i Optional : Name of the Docker image to use for build (default: debian:jessie)"
echo " -k Optional : Keep the Docker container after build "
@ -62,12 +61,6 @@ function create_container {
EOF
# Add default opts file if defined
if [[ -e "${DEFAULT_OPTS}" ]]; then
ln -s "${DEFAULT_OPTS}" "$temp_dir/default_opts"
echo "ADD ./default_ops /tmp/tamarin/default_opts" >> "$temp_dir/Dockerfile"
fi
exec_hooks "containerbuild" "$temp_dir"
echo "CMD /root/.tamarin/lib/build.sh ${projectName} ${BUILD_BRANCH} /tmp ${BUILD_TAG}" >> "$temp_dir/Dockerfile"
@ -152,9 +145,6 @@ do
a)
TARGET_ARCH=${OPTARG}
;;
o)
DEFAULT_OPTS=$(readlink -f ${OPTARG})
;;
*)
show_usage
;;
@ -172,7 +162,7 @@ if [[ "${TARGET_ARCH}" =~ ^i[0-9]86$ ]] && [ -z "${BASE_IMAGE}" ]; then
BASE_IMAGE=${DEFAULT_32_IMAGE}
fi
[[ -z ${BASE_IMAGE} ]] && BASE_IMAGE=${DEFAULT_64_IMAGE}
[[ -z ${BASE_IMAGE} ]] && BASE_IMAGE=${DEFAULT_64_IMAGE}
#
# Warn user about "proxy"