builder: Update builder scripts and clever-show service for compability with v0.18

This commit is contained in:
Arthur Golubtsov
2019-10-04 20:28:59 +03:00
parent eb2a38e671
commit e101e71e8b
3 changed files with 7 additions and 6 deletions

View File

@@ -3,9 +3,9 @@ Description=Clever Show Client Service
After=clever.service
[Service]
WorkingDirectory=/home/pi/CleverSwarm/Drone
EnvironmentFile=/lib/systemd/system/roscore.env
ExecStart=/usr/bin/python /home/pi/CleverSwarm/Drone/copter_client.py
WorkingDirectory=/home/pi/clever-show/Drone
ExecStart=/bin/bash -c ". /home/pi/catkin_ws/devel/setup.sh; \
/usr/bin/python /home/pi/clever-show/Drone/copter_client.py"
KillSignal=SIGKILL
Restart=on-failure
RestartSec=3

View File

@@ -41,6 +41,7 @@ if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="$(cd ${REPO_DIR}; git log --forma
# IMAGE_VERSION="${TRAVIS_TAG:=$(cd ${REPO_DIR}; git log --format=%h -1)}"
REPO_URL="$(cd ${REPO_DIR}; git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1 | sed 's/git@github\.com\:/https\:\/\/github.com\//')"
REPO_NAME="$(basename -s '.git' ${REPO_URL})"
echo_stamp "REPO_NAME=${REPO_NAME}" "INFO"
IMAGE_NAME="${REPO_NAME}_${IMAGE_VERSION}.img"
echo_stamp "IMAGE_NAME=${IMAGE_NAME}" "INFO"
IMAGE_PATH="${IMAGES_DIR}/${IMAGE_NAME}"
@@ -99,10 +100,10 @@ echo_stamp "Mount dirs ${MOUNT_POINT} & ${MOUNT_POINT}/boot"
mount "${DEV_IMAGE}p2" ${MOUNT_POINT}
mount "${DEV_IMAGE}p1" ${MOUNT_POINT}/boot
mkdir -p ${MOUNT_POINT}'/home/pi/CleverSwarm/'
mkdir -p ${MOUNT_POINT}'/home/pi/clever-show/'
for dir in ${REPO_DIR}/*; do
if [[ $dir != *"images" && $dir != *"imgcache" ]]; then
cp -r $dir ${MOUNT_POINT}'/home/pi/CleverSwarm/'$(basename $dir)
cp -r $dir ${MOUNT_POINT}'/home/pi/clever-show/'$(basename $dir)
fi;
done

View File

@@ -50,7 +50,7 @@ my_travis_retry() {
}
echo_stamp "Change repo owner to pi"
chown -Rf pi:pi /home/pi/CleverSwarm/
chown -Rf pi:pi /home/pi/clever-show/
echo_stamp "Update apt cache"
apt-get update -qq