]> WPIA git - gigi.git/commitdiff
add: script to generate changelog based on git info
authorFelix Dörre <felix@dogcraft.de>
Mon, 6 Nov 2017 21:02:00 +0000 (22:02 +0100)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Thu, 28 Dec 2017 11:44:26 +0000 (12:44 +0100)
Extract version and date of the debian/changelog file from git.

Additionally adjust the jenkins template with general updates and
invocation of the new generation script.

Change-Id: I2c286e7c4411385fabecdbde74a6a1e6cfbb803e

doc/jenkinsJob/config.xml
doc/scripts/genchangelog [new file with mode: 0755]

index 00a23c16bcdd2a59de278a23698d84b457e268b3..852e725d9a44def7dcb6456b54609b575120651a 100644 (file)
           <name>BRANCH</name>
           <description>The branch to build from.</description>
           <defaultValue>$GERRIT_PATCHSET_REVISION</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
         <hudson.model.StringParameterDefinition>
           <name>JAVA_HOME</name>
           <description></description>
           <defaultValue>/usr/lib/jvm/openjdk-8-jdk-gigi</defaultValue>
+          <trim>false</trim>
         </hudson.model.StringParameterDefinition>
       </parameterDefinitions>
     </hudson.model.ParametersDefinitionProperty>
@@ -220,7 +222,9 @@ EOT
 localePath=$$$$LOCALE_FETCH_PATH$$$$</properties>
     </hudson.tasks.Ant>
     <hudson.tasks.Shell>
-      <command>cd gigi
+      <command>rm -v *.deb
+cd gigi
+[ -f doc/scripts/genchangelog ] &amp;&amp; doc/scripts/genchangelog
 dpkg-buildpackage -b -us -uc</command>
     </hudson.tasks.Shell>
   </builders>
diff --git a/doc/scripts/genchangelog b/doc/scripts/genchangelog
new file mode 100755 (executable)
index 0000000..4a4e716
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+cd "$(git rev-parse --show-toplevel)"
+cat > debian/changelog <<EOF
+wpia-gigi ($(git describe HEAD --tags --match "v*" | sed "s/^v//")) unstable; urgency=low
+
+  * Initial release
+
+ -- WPIA Software Team <software@wpia.club>  $(git show HEAD --pretty=format:%aD --no-patch)
+EOF