Update release.sh

This commit is contained in:
Ivan Blinkov 2020-01-29 21:05:47 +03:00 committed by GitHub
parent 1cda31628c
commit 699c429e30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,6 @@ if [[ -z "$1" ]]
then then
source "${BASE_DIR}/venv/bin/activate" source "${BASE_DIR}/venv/bin/activate"
python "${BASE_DIR}/build.py" "--enable-stable-releases" python "${BASE_DIR}/build.py" "--enable-stable-releases"
set +e
rm -rf "${PUBLISH_DIR}" || true rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${PUBLISH_DIR}" git clone "${GIT_TEST_URI}" "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}" cd "${PUBLISH_DIR}"
@ -36,14 +35,12 @@ then
git add * git add *
git commit -a -m "add new release at $(date)" git commit -a -m "add new release at $(date)"
git push origin master git push origin master
set -e
cd "${BUILD_DIR}" cd "${BUILD_DIR}"
docker build -t "${FULL_NAME}" "${BUILD_DIR}" docker build -t "${FULL_NAME}" "${BUILD_DIR}"
docker tag "${FULL_NAME}" "${REMOTE_NAME}" docker tag "${FULL_NAME}" "${REMOTE_NAME}"
DOCKER_HASH=$(docker push "${REMOTE_NAME}" | tail -1 | awk '{print $3;}') DOCKER_HASH=$(docker push "${REMOTE_NAME}" | tail -1 | awk '{print $3;}')
docker rmi "${FULL_NAME}" docker rmi "${FULL_NAME}"
else else
set +e
rm -rf "${BUILD_DIR}" || true rm -rf "${BUILD_DIR}" || true
rm -rf "${PUBLISH_DIR}" || true rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${BUILD_DIR}" git clone "${GIT_TEST_URI}" "${BUILD_DIR}"
@ -59,7 +56,6 @@ else
git add * git add *
git commit -a -m "add new release at $(date)" git commit -a -m "add new release at $(date)"
git push origin master git push origin master
set -e
fi fi
QLOUD_ENDPOINT="https://platform.yandex-team.ru/api/v1" QLOUD_ENDPOINT="https://platform.yandex-team.ru/api/v1"