aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-26 17:32:28 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-02-29 08:52:25 -0300
commitae00d7e282ae36d8ba09b230ef46292444e0cef8 (patch)
treeb70225adeff71c645d14d33d95244a06222e3c0c /.gitlab-ci.yml
parentbuild: add print-version target and use in CI (diff)
downloadfirejail-ae00d7e282ae36d8ba09b230ef46292444e0cef8.tar.gz
firejail-ae00d7e282ae36d8ba09b230ef46292444e0cef8.tar.zst
firejail-ae00d7e282ae36d8ba09b230ef46292444e0cef8.zip
ci: add and use PKGNAME variable in in debian_ci
To reduce hardcoding. Note that this reduces duplication but the value is still hardcoded in the job; it is not sourced from TARNAME in config.mk.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8f6669203..b72dced7a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -103,6 +103,7 @@ debian_ci:
103 DEBFULLNAME: "$GITLAB_USER_NAME" 103 DEBFULLNAME: "$GITLAB_USER_NAME"
104 DEBEMAIL: "$GITLAB_USER_EMAIL" 104 DEBEMAIL: "$GITLAB_USER_EMAIL"
105 DEBIAN_FRONTEND: noninteractive 105 DEBIAN_FRONTEND: noninteractive
106 PKGNAME: firejail
106 before_script: 107 before_script:
107 - git checkout -B ci_build "$CI_COMMIT_SHA" 108 - git checkout -B ci_build "$CI_COMMIT_SHA"
108 - gitlab-ci-enable-sid 109 - gitlab-ci-enable-sid
@@ -117,17 +118,17 @@ debian_ci:
117 - git config user.email "$DEBEMAIL" 118 - git config user.email "$DEBEMAIL"
118 - | 119 - |
119 cd "$CI_PROJECT_DIR/.." 120 cd "$CI_PROJECT_DIR/.."
120 apt-get source --download-only -t experimental firejail || 121 apt-get source --download-only -t experimental "$PKGNAME" ||
121 apt-get source --download-only firejail 122 apt-get source --download-only "$PKGNAME"
122 - | 123 - |
123 cd "$CI_PROJECT_DIR" 124 cd "$CI_PROJECT_DIR"
124 tar xf ../firejail_*.debian.tar.* 125 tar xf "../${PKGNAME}"_*.debian.tar.*
125 - rm -rf debian/patches/ 126 - rm -rf debian/patches/
126 - | 127 - |
127 VERSION="$(grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2)" 128 VERSION="$(grep ^PACKAGE_VERSION= configure | cut -d "'" -f 2)"
128 dch -v "${VERSION}-0.1~ci" 'Non-maintainer upload.' 129 dch -v "${VERSION}-0.1~ci" 'Non-maintainer upload.'
129 git archive -o "../firejail_${VERSION}.orig.tar.gz" HEAD 130 git archive -o "../${PKGNAME}_${VERSION}.orig.tar.gz" HEAD
130 pristine-tar commit "../firejail_${VERSION}.orig.tar.gz" ci_build 131 pristine-tar commit "../${PKGNAME}_${VERSION}.orig.tar.gz" ci_build
131 git branch -m pristine-tar origin/pristine-tar 132 git branch -m pristine-tar origin/pristine-tar
132 - git add debian 133 - git add debian
133 - git commit -m 'add debian/' 134 - git commit -m 'add debian/'