]> git.ipfire.org Git - pakfire.git/commitdiff
jenkins: Debian wants a source tarball
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Dec 2024 19:00:55 +0000 (19:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Dec 2024 17:03:49 +0000 (17:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Jenkinsfile

index 044ebbaa6b19780da357460cb399feb5c4304cf0..6d6bfef9b67d10ca59e919c1bbfeee4baed95571 100644 (file)
@@ -298,7 +298,32 @@ pipeline {
                                                        }
 
                                                        stage("Build") {
+                                                               environment {
+                                                                       VERSION = ""
+                                                               }
+
                                                                steps {
+                                                                       // Fetch the version
+                                                                       script {
+                                                                               env.VERSION = sh(
+                                                                                       script: """
+                                                                                               dpkg-parsechangelog --show-field Version | sed "s/-[^-]*\$//"
+                                                                                       """, returnStdout: true
+                                                                               ).trim()
+                                                                       }
+
+                                                                       // Create the source tarball from the checked out source
+                                                                       sh """
+                                                                               tar \
+                                                                                       --create \
+                                                                                       --verbose \
+                                                                                       --xz \
+                                                                                       --file="../pakfire_${env.VERSION}.orig.tar.xz" \
+                                                                                       --transform="s|^|pakfire-${env.VERSION}/|"
+                                                                                       *
+                                                                       """
+
+                                                                       // Build the packages
                                                                        sh """
                                                                                dpkg-buildpackage \
                                                                                        --host-arch ${env.ARCH} \