Browse Source

do not download package if found on ./

master
parent
commit
98f6d2bd2b
  1. 2
      Jenkinsfile
  2. 14
      debian/rules
  3. 16
      fresh.sh

2
Jenkinsfile vendored

@ -117,7 +117,7 @@ def copyArtifact(){
}
def buildPackage() {
copyArtifacts(projectName: 'Spoje.Net/FreshAbraFlexi', flatten: true, target: '..' );
copyArtifacts(projectName: 'Spoje.Net/FreshAbraFlexi', flatten: true, target: './' );
def LATESTURL = sh (
script: 'curl -s -q https://www.flexibee.eu/podpora/stazeni-flexibee/stazeni-ekonomickeho-systemu-flexibee-linux/ | grep _all.deb | awk -F\'"\' \'{print \$2}\' | head -n 1',

14
debian/rules vendored

@ -4,19 +4,7 @@
dh $@
override_dh_prep:
mkdir -p tmp
cd tmp
rm -rf *
ls -la
ls -la ..
ls -la ../..
ls -la ../../..
ar -x ../flexibee_*_all.deb
cd ..
mkdir data
cd data
tar xzvf ../tmp/data.tar.gz
cd ..
./fresh.sh
dh_prep
override_dh_build:

16
fresh.sh

@ -3,13 +3,17 @@
PACKAGE="flexibee-server"
LATESTURL=`curl -q https://www.flexibee.eu/podpora/stazeni-flexibee/stazeni-ekonomickeho-systemu-flexibee-linux/ | grep _all.deb | awk -F'"' '{print $6}' | head -n 1`
LATESTPKG=`basename $LATESTURL`
wget -c $LATESTURL
VERSION=`echo $LATESTPKG | awk -F_ '{print $2}'`
REVISION=`cat debian/revision | perl -ne 'chomp; print join(".", splice(@{[split/\./,$_]}, 0, -1), map {++$_} pop @{[split/\./,$_]}), "\n";'`
echo XXXXXXXXXXXXXXXXXXXXXXXXXX Building $VERSION-$REVISION
if [ -f $LATESTPKG ];
then
echo use existing $LATESTPKG
else
wget -c $LATESTURL
CHANGES=`git log -n 1 | tail -n+5`
dch --newversion $VERSION $CHANGES
fi
rm -rf tmp debian/data data
@ -25,7 +29,5 @@ cd data
tar xzvf ../tmp/data.tar.gz
cd ..
CHANGES=`git log -n 1 | tail -n+5`
dch --newversion $VERSION $CHANGES

Loading…
Cancel
Save