2017-10-31 13:23:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
set -o pipefail -o nounset -o errexit
|
|
|
|
|
|
|
|
|
|
REPO="ssh://git@gitlab.cabillot.eu:2224/www/dl.git"
|
|
|
|
|
REPO2="https://github.com/blueimp/jQuery-File-Upload.git"
|
|
|
|
|
TAG="registry.cabillot.eu/www/dl"
|
|
|
|
|
|
|
|
|
|
(
|
|
|
|
|
if [[ ! -d "build/" ]]
|
|
|
|
|
then
|
2017-10-31 13:24:36 +00:00
|
|
|
git clone "${REPO}" "build/"
|
2017-10-31 13:23:13 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd "build/"
|
|
|
|
|
git pull
|
|
|
|
|
|
|
|
|
|
if [[ ! -d "src" ]]
|
|
|
|
|
then
|
|
|
|
|
git clone "${REPO2}" "src"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd "src"
|
|
|
|
|
git pull
|
|
|
|
|
)
|
|
|
|
|
|
2017-10-31 13:23:32 +00:00
|
|
|
docker build --no-cache=true -t "${TAG}" build/
|
|
|
|
|
docker push "${TAG}"
|