]> Frank Brehm's Git Trees - pixelpark/python-packaging.git/commitdiff
Appending debian/changelog to spec file only if it exists
authorFrank Brehm <frank@brehm-online.com>
Mon, 2 Jan 2023 11:05:31 +0000 (12:05 +0100)
committerFrank Brehm <frank@brehm-online.com>
Mon, 2 Jan 2023 11:05:31 +0000 (12:05 +0100)
gitlab/build-template-python.yaml

index ad7409b92a48d6465078195b574c3c604945e2bd..337e932277b82be8ec30dafa0e181b826144297c 100644 (file)
@@ -257,12 +257,14 @@ variables:
           echo "Removing 'Recommends' lines from '${TGT_SPEC_FILE}' ..."
           sed -i '/^Recommends/d' "${TGT_SPEC_FILE}"
       fi
-      echo
-      echo "Adding Changelog to '${TGT_SPEC_FILE}' ..."
-      if [[ -f bin/dch2speclog ]] ; then
-          python${PYTHON_VERSION_DOT} bin/dch2speclog debian/changelog >>"${TGT_SPEC_FILE}"
-      else
-          dch2speclog debian/changelog >>"${TGT_SPEC_FILE}"
+      if [[ -f debian/changelog ]] ; then
+          echo
+          echo "Adding Changelog to '${TGT_SPEC_FILE}' ..."
+          if [[ -f bin/dch2speclog ]] ; then
+              python${PYTHON_VERSION_DOT} bin/dch2speclog debian/changelog >>"${TGT_SPEC_FILE}"
+          else
+              dch2speclog debian/changelog >>"${TGT_SPEC_FILE}"
+          fi
       fi
       echo
       echo "Generated spec-file:"