Commit c178d31b authored by Tomasz Kucner's avatar Tomasz Kucner
Browse files

improved scripts

parent 17192ce4
......@@ -17,7 +17,7 @@ ubuntu-xenial:
- apt-get install -qq -y python-catkin-tools #> /dev/null
- rosdep update #2> /dev/null
- rosdep install --from-paths . -i -y -r --rosdistro $CI_ROS_DISTRO #2> /dev/null
# - add_v4r_yaml
# - add_ndt_core_yaml
stage: build
script:
......@@ -54,7 +54,7 @@ ubuntu-xenial-build-package:
- apt-get install -f -y # > /dev/null
- rosdep update #2> /dev/null
- rosdep install --from-paths . -i -y -r --rosdistro $CI_ROS_DISTRO # 2> /dev/null
#- add_v4r_yaml
#- add_ndt_core_yaml
stage: build
script:
......
#!/bin/bash
add_v4r_yaml() {
echo "yaml file:///`pwd`/rosdep/${CI_ROS_DISTRO}.yaml" | tee /etc/ros/rosdep/sources.list.d/10-v4r.list
rosdep update #> /dev/null
add_ndt_core_yaml() {
# echo "yaml file:///`pwd`/rosdep/${CI_ROS_DISTRO}.yaml" | tee /etc/ros/rosdep/sources.list.d/10-v4r.list
# rosdep update #> /dev/null
}
setup_apt() {
echo "deb [arch=amd64] https://rwiki.acin.tuwien.ac.at/apt/v4r-release ${1} main" | tee /etc/apt/sources.list.d/v4r.list
wget -qO - https://rwiki.acin.tuwien.ac.at/apt/v4r-release/Public.key | apt-key add -
apt-get update -qq #> /dev/null
# echo "deb [arch=amd64] https://rwiki.acin.tuwien.ac.at/apt/v4r-release ${1} main" | tee /etc/apt/sources.list.d/v4r.list
# wget -qO - https://rwiki.acin.tuwien.ac.at/apt/v4r-release/Public.key | apt-key add -
# apt-get update -qq #> /dev/null
}
#!/bin/bash
release_messages() {
for i in *msgs; do
create_debian_package "$i"
done
dpkg -i ros-*msgs*_amd64.deb #> /dev/null
}
release_dependency_packages() {
for i in ndt_generic ndt_map ndt_registration ndt_rviz ndt_visualisation ; do
create_debian_package "$i"
done
dpkg -i ros-*_amd64.deb #> /dev/null
move_debian_packages
}
release_ros_wrappers() {
for i in `ls -d */|grep -v 'rosdep\|images\|msgs\|ndt_core'`; do
create_debian_package "$i"
done
dpkg -i ros-*_amd64.deb #> /dev/null
move_debian_packages
}
release_meta_package() {
create_debian_package "ndt_core"
dpkg -i ros-*ndt_core*_amd64.deb #> /dev/null
move_debian_packages
}
create_debian_package() {
cd $1
if [ -f .done ]; then
echo "Package $1 was already build. Skipping..."
else
echo "generating debian package for $1"
bloom-generate rosdebian --os-name ubuntu --os-version $UBUNTU_DISTRO --ros-distro $CI_ROS_DISTRO &&\
sed -i 's/dh $@/dh $@ --parallel/' debian/rules
debuild -rfakeroot -us -uc -b -j8 #> /dev/null
touch .done
fi
cd ..
}
move_debian_packages() {
mv *deb .build/
}
release_package() {
release_messages
release_dependency_packages
release_ros_wrappers
release_meta_package
}
show_info() {
echo $UBUNTU_DISTRO
echo $CI_ROS_DISTRO
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment