From eb8d02945bf2533e32a8d26485cbe45508a79c51 Mon Sep 17 00:00:00 2001 From: Arthur Golubtsov Date: Sun, 8 Sep 2019 23:16:12 +0300 Subject: [PATCH] builder: Another fix of cloning repo --- builder/image-build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/builder/image-build.sh b/builder/image-build.sh index 2d5b425..201dd16 100755 --- a/builder/image-build.sh +++ b/builder/image-build.sh @@ -72,13 +72,18 @@ get_image ${IMAGE_PATH} ${SOURCE_IMAGE} # Make free space img-resize ${IMAGE_PATH} max '5G' +# Reconfiguring clever show repository for simplier unshallowing +# git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + # Checkout to tag's branch if built with travis tag if [[ ! -z ${TRAVIS_TAG} ]]; then + cd ${REPO_DIR} REMOTE_BRANCH="$(git branch -r --contains ${TRAVIS_TAG} | sed -n 1p | cut -d ' ' -f 5)" BRANCH="$(echo ${REMOTE_BRANCH} | cut -d '/' -f 2)" echo_stamp "Checkout to ${REMOTE_BRANCH} from ${TRAVIS_TAG}" "INFO" git branch ${BRANCH} ${REMOTE_BRANCH} git checkout ${BRANCH} + cd / fi # Copy cloned repository to the image @@ -110,10 +115,6 @@ img-chroot ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-software.sh' # Configure image img-chroot ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-configure.sh' -# Reconfiguring clever show repository for simplier unshallowing -cd ${REPO_DIR} -git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" - # Copy service file for clever show client img-chroot ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/clever-show.service' '/lib/systemd/system/'