Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
}
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} \