Re: [qet] Fedora / RHEL / CentOS build of qelectrotech SVN snapshot

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Le mercredi 29 janvier 2014, 14:55:41 Remi Collet a écrit :

> Le 29/01/2014 06:22, laurent Trinques a écrit :

> > Ok, good idea for switch to a "dev" version, is done now.

>

> Perhaps it could be even nicer to have something like:

>

> const QString displayedVersion = "0.4-dev ($Rev: 1234$)";

>

> Should be updated automatically with standard SVN setup (need to be tried).

>

> Remi.

 

I don't know how to use subversion to patch source files automatically.

 

But i use scripts to scan latest revision and patch "const QString displayedVersion" in qet.h after svn export.

 

MS-Windows Cygwin

 

#!/bin/bash

 

# trouve la derniere revision de svn://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3

if [ -z "$HEAD" ] ; then

HEAD=$(svn --xml info svn://svn.tuxfamily.org/svnroot/qet/qet/trunk | grep revision=\" | tail -1 | cut -d\" -f2) #trunk

echo -e "\033[1;34mdownload source qelectrotech-0.30.r$HEAD.\033[m"

fi

 

 

#cd $TEMP_DIR

svn export svn://svn.tuxfamily.org/svnroot/qet/qet/trunk qelectrotech_trunk/

 

 

cd qelectrotech_trunk/sources

sed -i "s/const QString displayedVersion = \"0.4-dev\"/const QString displayedVersion = \"0.4-dev+svn$HEAD\"/" qet.h

 

exit

 

 

 

Debian package:

 

1)scan latest svn revision

 

2) Quilt patch

 

Description: tagg version

Author: laurent trinques <spam5c04pi0810@xxxxxxxxx>

--- qelectrotech-0.30.r2788.orig/sources/qet.h

+++ qelectrotech-0.30.r2788/sources/qet.h

@@ -26,7 +26,7 @@

/// QElectroTech version (as string, used to mark projects and elements XML documents)

const QString version = "0.4-dev";

/// QElectroTech displayed version

- const QString displayedVersion = "0.4-dev";

+ const QString displayedVersion = "0.4-dev+svn2785";

QString license();

/// Orientation (used for electrical elements and their terminals)

enum Orientation {North, East, South, West};

 

 

After i use sed to patch quilt patch

sed -i 's/0.4-dev+svn[0-9][0-9][0-9][0-9]/'"0.4-dev+svn$HEAD"'/' 03_qet.diff

 

See attached debian packaging script

 

I explain in Qet forum for Windows

 

http://qelectrotech.org/forum/viewtopic.php?id=308

 

Laurent

Attachment: reprepro.sh
Description: application/shellscript



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/