builder: Copy checked out repo instead of re-cloning it

This commit is contained in:
sfalexrog
2019-02-13 21:14:18 +03:00
parent 4d77c4a400
commit d9cd7c161b
2 changed files with 11 additions and 3 deletions

View File

@@ -79,6 +79,16 @@ ${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/init_rp
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/hardware_setup.sh' '/root/'
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} exec ${SCRIPTS_DIR}'/image-init.sh' ${IMAGE_VERSION} ${SOURCE_IMAGE}
# Copy cloned repository to the image
# Include dotfiles in globs (asterisks)
shopt -s dotglob
for dir in ${REPO_DIR}/*; do
# Don't try to copy image into itself
if [ $dir != 'images' ]; then
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy $dir '/home/pi/catkin_ws/src/clever/'
fi;
done
# Monkey
${BUILDER_DIR}/image-chroot.sh ${IMAGE_PATH} copy ${SCRIPTS_DIR}'/assets/monkey' '/root/'

View File

@@ -136,10 +136,8 @@ if [ "${INSTALL_ROS_PACK_SOURCES}" = "true" ]; then
fi
echo_stamp "Installing CLEVER" \
&& git clone ${REPO} /home/pi/catkin_ws/src/clever \
&& cd /home/pi/catkin_ws/src/clever \
&& echo "REF: ${REF}" \
&& git checkout ${REF} \
&& git status \
&& cd /home/pi/catkin_ws \
&& resolve_rosdep $(pwd) \
&& my_travis_retry pip install wheel \