]> Frank Brehm's Git Trees - pixelpark/pp-admin-tools.git/commitdiff
Generating .spec-file
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 16 Dec 2021 10:41:41 +0000 (11:41 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 16 Dec 2021 10:41:41 +0000 (11:41 +0100)
.gitlab-ci.yml

index 7074aa719773a1c88146fb5f6e295709c675d73a..8de2e21a63743419394fbe64b1164eced87a910a 100644 (file)
@@ -189,7 +189,7 @@ Linter:
     - ${YUM} --assumeyes upgrade
     - ${YUM} --assumeyes install ${PYTHON_PACKAGES} gnupg2 rpm-build tree gettext expect
     - ls -l --color=always /bin/python* /bin/pip* || true
-    - pip3 list
+    - pip3 list --format columns
   script:
     - mkdir -pv rpmdir
     - mkdir -pv rpmdir/SOURCES
@@ -206,6 +206,18 @@ Linter:
       cd rpmdir/SOURCES && tar cfz "pp_admintools.${PKG_VERSION}.tar.gz" "pp_admintools-${PKG_VERSION}"
       ls -lA --color=always
       cd "${ODIR}"
+    - |
+      echo "Generating pp-admintools.spec ..."
+      PKG_VERSION=$( ./get-rpm-version )
+      PKG_RELEASE=$( ./get-rpm-release )
+      cat pp-admintools.spec.template | \
+          sed -e "s/@@@Version@@@/$PKG_VERSION/gi" \
+              -e "s/@@@Release@@@/${PKG_RELEASE}/gi" \
+              -e "s/@@@py_version_dot@@@/${PYTHON_VERSION_DOT}/gi" \
+              -e "s/@@@py_version_nodot@@@/${PYTHON_VERSION_NODOT}/gi" > pp-admintools.spec
+      echo "Generated spec-file:"
+      cat pp-admintools.spec
+
 
 build CentOS 7 with Python 3.6:
   variables:
@@ -214,6 +226,8 @@ build CentOS 7 with Python 3.6:
     PYTHON_PACKAGES: >
       python36 python36-pip python36-devel python3-setuptools
       python36-pytz python36-babel python36-six
+    PYTHON_VERSION_DOT: 3.6
+    PYTHON_VERSION_NODOT: 36
   extends:
     - '.pkg-build-rules'
   image: centos:7