release.sh 963 Bytes
Newer Older
daniel's avatar
daniel committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#!/bin/bash

release_dependency_packages() {
    for i in "graph_map  graph_localization ndt_calibration ndt_evaluation"; do
	create_debian_package "$i"
	dpkg -i ros-*_amd64.deb > /dev/null
    done
    move_debian_packages
}

release_meta_package() {
    
    create_debian_package "<meta package>"
    dpkg -i ros-*_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_dependency_packages
    #release_meta_package
}

show_info() {
    echo $UBUNTU_DISTRO
    echo $CI_ROS_DISTRO
}