fixed build

parent c8ca38c9
Pipeline #19081 passed with stages
in 1 minute and 18 seconds
......@@ -5,14 +5,14 @@
apt-get update && apt-get install -y devscripts
CHANGELOG="package/debian/changelog"
LINE=$(head -n 1 $CHANGELOG)
PACKAGE=$(echo $LINE | cut -d' ' -f1)
VERSION=$(echo $LINE | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
tar --exclude=debian -czf ${PACKAGE}_${VERSION}.orig.tar.gz package/*
LINE=$(head -n 1 "$CHANGELOG")
PACKAGE=$(echo "$LINE" | cut -d' ' -f1)
VERSION=$(echo "$LINE" | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
tar --exclude=debian -czf "${PACKAGE}"_"${VERSION}".orig.tar.gz package/*
cd package
debuild -us -uc
cd ../
cd package || exit 1
debuild -us -uc --lintian-opts --profile debian
cd ../ || exit 1
mkdir build/
mv ${PACKAGE}* build/
mv "${PACKAGE}"* build/
#!/bin/bash
# shellcheck disable=SC2029
# This script uploads an includes a .deb package in our debian repository.
# The distribution is chosen based on the gitlab-ci stage we are on.
......
## Template para empacotamento utilizando o Gitlab-ci.
stages:
- lint
- build
- test
- deploy
lint_shell:
stage: lint
tags:
- debian-packaging
script:
- ./.linter_shell.sh
build:
stage: build
artifacts:
......@@ -12,6 +20,7 @@ build:
tags:
- debian-packaging
script:
- apt-get update && apt-get install -y devscripts debhelper dh-systemd python-distutils-extra pandoc
- ./.build.sh
test:
......
......@@ -4,12 +4,10 @@ Priority: optional
Maintainer: C3SL <lesuporte@c3sl.ufpr.br>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.8
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: https://anonscm.debian.org/collab-maint/le-add-missing-file-version.git
#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/le-add-missing-file-version.git
Vcs-Git: https://gitlab.c3sl.ufpr.br/le6/le-add-missing-file-version.git
Vcs-Browser: https://gitlab.c3sl.ufpr.br/le6/le-add-missing-file-version.git
Package: le-add-missing-file-version
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Description: This package is to add a missing file at `/etc/le_version` which has got a version of LE, and it is used by the agent to send information to proinfodata.
......@@ -25,7 +25,7 @@ case "$1" in
abort-upgrade|abort-remove|abort-deconfigure)
if [ -f "/etc/os-release" ];then
LE_VERSION=$(cat /etc/os-release | grep PRETTY_NAME| egrep -o "[0-9]+(.[0-9]+)?(.[0-9]+)?")
LE_VERSION=$(grep "PRETTY_NAME" < /etc/os-release| egrep -o "[0-9]+(.[0-9]+)?(.[0-9]+)?")
echo "$LE_VERSION" > "/etc/le_version"
else
echo "file '/etc/os-release' does not exist"
......
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