Skip to content
Snippets Groups Projects
Commit 1b757908 authored by Daniel Bissani Furlin's avatar Daniel Bissani Furlin
Browse files

Merge branch 'develop' into 'master'

Deploy on testing

See merge request !15
parents 27634d3d 853bacc1
No related branches found
No related tags found
1 merge request!15Deploy on testing
Pipeline #17010 passed
......@@ -6,13 +6,13 @@ 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/*
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
cd package || exit 1
debuild -us -uc
cd ../
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.
apt-get update && apt-get install -y dput ssh
eval $(ssh-agent -s)
eval "$(ssh-agent -s)"
ssh-add <(echo "$PRIV_KEY")
echo "Deploy job name: $CI_JOB_NAME"
if [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
if [ "$CI_JOB_NAME" = "deploy_for_unstable" ]; then
dput -u -f --config=dput.cf repo build/*.changes
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
else
if [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
REPO_SRC="unstable"
REPO_TGT="testing"
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
REPO_SRC="testing"
REPO_TGT="stable"
fi
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]*')
PACKAGE=$(echo "$LINE" | cut -d' ' -f1)
VERSION=$(echo "$LINE" | cut -d' ' -f2 | grep -o -E '[0-9]*\.[0-9]*\.[0-9]*')
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc $REPO_TGT $REPO_SRC $PACKAGE $VERSION"
REPREPRO_CMD="reprepro -Vb /home/repository/www/le6 copysrc stable testing $PACKAGE $VERSION"
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
fi
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
fi
## Template para empacotamento utilizando o Gitlab-ci.
stages:
- lint
- build
- test
- deploy
lint_shell:
stage: lint
tags:
- debian-packaging
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install wget locales locales-all -y
- locale-gen pt_BR.UTF-8
- export LANG=pt_BR.UTF-8
- scversion="stable" # or "v0.4.7", or "latest"
- wget "https://storage.googleapis.com/shellcheck/shellcheck-$scversion.linux.x86_64.tar.xz"
- tar --xz -xvf "shellcheck-$scversion.linux.x86_64.tar.xz"
- shellcheck() { "shellcheck-$scversion/shellcheck" "$@"; }
- ./.linter_shell.sh
build:
stage: build
artifacts:
......@@ -31,10 +46,22 @@ test:
dependencies:
- build
deploy_for_unstable:
stage: deploy
only:
- develop
tags:
- debian-packaging
script:
- ./.deploy.sh
dependencies:
- build
deploy_for_testing:
stage: deploy
when: manual
only:
- master
- master
tags:
- debian-packaging
script:
......
#!/bin/bash
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
sh_files=$(find -name "*.sh")
exe_files=$(grep -Erl "#\!/bin/(bash|sh)" --exclude=*.* package)
files="$sh_files\n$exe_files"
#find no files
if [[ "$files" == "\n" ]];then
echo -e "${YELLOW}No shell files found!${NC}"
exit 0
fi
echo -e "$files"| xargs shellcheck -s bash
if [[ $? -eq 0 ]];then
echo "AWESOME!No problems found."
exit 0
else
echo -e "Understand errors in: ${BLUE}https://github.com/koalaman/shellcheck/wiki${NC}"
exit 1
fi
le-user-apps (0.0.8) unstable; urgency=medium
* Fix Linter errors
-- Stephanie Briere Americo <lesuporte@c3sl.ufpr.br> Mon, 09 Jul 2018 11:26:53 -0300
le-user-apps (0.0.7) testing; urgency=medium
* Add le-control-panel
......
......@@ -26,9 +26,8 @@ set -e
# Icons paths
icon="/usr/share/pixmaps/gconjugue.png"
AppPath="/usr/share/applications"
DivertPath="/usr/share/le-user-apps"
if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then
if [[ remove = "$1" || abort-install = "$1" || disappear = "$1" ]]; then
dpkg-divert --package le-user-apps --rename --remove $icon
dpkg-divert --package le-user-apps --rename --remove $AppPath/gconjugue.desktop
dpkg-divert --package le-user-apps --rename --remove $AppPath/tuxtype.desktop
......
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