Commit 0e33578d authored by André Machado's avatar André Machado

SCRUM#400: Add le-auto-upgrades status

And add linter
parent af03d885
Pipeline #15063 passed with stages
in 9 minutes and 13 seconds
......@@ -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 --lintian-opts --profile debian
cd ../
cd ../ || exit -1
mkdir build/
mv ${PACKAGE}* build/
mv "${PACKAGE}"* build/
......@@ -5,7 +5,7 @@
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"
......@@ -15,9 +15,10 @@ if [ "$CI_JOB_NAME" = "deploy_for_testing" ]; then
elif [ "$CI_JOB_NAME" = "deploy_for_stable" ]; then
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 stable testing $PACKAGE $VERSION"
# shellcheck disable=SC2029
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa repository@repo.c3sl.ufpr.br "$REPREPRO_CMD"
fi
fi
[flake8]
max-complexity = 10
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
## Template para empacotamento utilizando o Gitlab-ci.
stages:
- lint
- build
- test
- deploy
lint_shell:
stage: lint
tags:
- debian-packaging
script:
- ./.linter_shell.sh
lint_python:
stage: lint
tags:
- debian-packaging
script:
- apt-get update && apt-get install python3-pip -y
- pip3 install -r py_linter_requirements.txt
- ./.linter_python.sh
build:
stage: build
artifacts:
......
#!/bin/bash
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
sh_files=$(find -name "*.py")
exe_files=$(grep -Erl "#\!/usr/bin/python*" --exclude=*.* package)
files="$sh_files\n$exe_files"
#find no files
if [[ "$files" == "\n" ]];then
echo -e "${YELLOW}No python files found!${NC}"
exit 0
fi
echo -e "$files" | xargs flake8
if [[ $? -eq 0 ]];then
echo "AWESOME!No problems found."
exit 0
else
echo -e "Understand errors in: ${BLUE}http://flake8.pycqa.org/en/latest/user/error-codes.html${NC}"
exit 1
fi
#!/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-control-panel (0.1.0) testing; urgency=medium
* Add le-auto-upgrades status
-- Andre Luis da Silva Machado <alsm14@inf.ufpr.br> Tue, 03 Apr 2018 10:32:45 -0300
le-control-panel (0.0.36) testing; urgency=medium
* Fix user created dialog buttons labels
......
......@@ -11,8 +11,9 @@ function cleanup() {
trap cleanup EXIT
inotifywait -r -m $MONITOREDPATH -e create -e moved_to -e delete -e delete_self |
while read path action file; do
kill -s $SIGNAL $PROCESS
inotifywait -r -m "$MONITOREDPATH" -e create -e moved_to -e delete -e delete_self -e modify |
while read -r path action file; do
kill -s "$SIGNAL" "$PROCESS"
echo "$path $action $file" > /dev/null
done
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.2 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkMessageDialog" id="dialogWrongPassword">
......@@ -45,9 +45,6 @@
</child>
</object>
</child>
<child>
<placeholder/>
</child>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
......@@ -278,42 +275,105 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box5">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="box5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">habilitar sistema de atualização automática</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Habilitar atualizações automáticas</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="switchAutoUpdate">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::active" handler="onToggleAutoUpdates" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxautoupdatestatus">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">habilitar sistema de atualização automática</property>
<property name="margin_top">3</property>
<property name="margin_bottom">3</property>
<child>
<object class="GtkLabel" id="label13">
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Habilitar atualizações automáticas</property>
<property name="label" translatable="yes">Status</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="switchAutoUpdate">
<object class="GtkImage" id="autoupdatestatusicon">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="notify::active" handler="onToggleAutoUpdates" swapped="no"/>
<property name="can_focus">False</property>
<property name="stock">gtk-no</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="labelautoupdatestatus">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xpad">10</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
</object>
......@@ -1022,9 +1082,6 @@
<action-widget response="1">createUserButton</action-widget>
<action-widget response="0">cancelCreateUserButton</action-widget>
</action-widgets>
<child>
<placeholder/>
</child>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
......
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