Skip to content
Snippets Groups Projects
Commit 9a7cf588 authored by Alejandro Lopez Gestoso's avatar Alejandro Lopez Gestoso
Browse files

Updated to latest version of package generation

parent dbc84bb3
No related branches found
No related tags found
No related merge requests found
image: docker.io/labrobotica/labrobotica:latest
image: docker.io/labrobotica/labrobotica:18.04
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
- deploy
build-package:
stage: build
script:
#- git submodule sync --recursive
#- git submodule update --init --recursive
- apt update || apt -y install ca-certificates && apt update
##Install dependencies
#- apt -y install iri-dep1-dev iri-dep2-dev
- mkdir -pv build
- cd build
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG ..
- make package -j $(nproc)
artifacts:
paths:
- build/*.deb
expire_in: 2 weeks
only:
- tags
update_repo:
stage: deploy
script:
- cd build
- "scp -i /root/.ssh/iriLabKeyNopwd -r *library-name*.deb irilabo@labrepo.iri.upc.edu:packages/"
- "ssh irilabo@labrepo.iri.upc.edu -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh library-name $(lsb_release -cs)"
only:
- tags
\ No newline at end of file
FROM_RDEPENDS_CI: "false"
TAG_VERSION: $CI_COMMIT_TAG
PACKAGE_NAME: "library-name"
include:
remote: 'https://gitlab.iri.upc.edu/labrobotica/packaging_ci/-/raw/master/packaging-ci.yml'
......@@ -75,6 +75,7 @@ IF (UNIX)
SET(CPACK_PACKAGING_INSTALL_PREFIX /usr)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://gitlab.iri.upc.edu/<package_repo_url>")
#Uncomment to add the necessary mantainer scripts
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm")
......
......@@ -379,20 +379,20 @@ fi
sed 's/library-name/'$NAME_WITH_DASHES'/g' <.gitlab-ci_template.yml >./.gitlab-ci.yml
#Add to .gitlab-ci.yml apt install dependencies like - apt -y install iri-dep1-dev iri-dep2-dev
if [ -n "$arr" ]
then
apt_deps=""
for x in $arr
do
dep_line="iri-$x-dev"
apt_deps="$apt_deps$dep_line "
done
line_to_add="\ \ \ \ \ \ - apt -y install $apt_deps"
file=./.gitlab-ci.yml
comment="##Install dependencies"
sed -i "/${comment}/ a ${line_to_add}" ${file}
fi
# #Add to .gitlab-ci.yml apt install dependencies like - apt -y install iri-dep1-dev iri-dep2-dev
# if [ -n "$arr" ]
# then
# apt_deps=""
# for x in $arr
# do
# dep_line="iri-$x-dev"
# apt_deps="$apt_deps$dep_line "
# done
# line_to_add="\ \ \ \ \ \ - apt -y install $apt_deps"
# file=./.gitlab-ci.yml
# comment="##Install dependencies"
# sed -i "/${comment}/ a ${line_to_add}" ${file}
# fi
sed 's/project_name/'$NAME'/g' <postinst_template >./scripts/debian/postinst
sed 's/project_name/'$NAME'/g' <prerm_template >./scripts/debian/prerm
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment