From dcf7caa08f9cadc276082fd0af63734afa479ac4 Mon Sep 17 00:00:00 2001 From: s3lph Date: Fri, 29 Nov 2024 01:41:28 +0100 Subject: [PATCH] fix(ci): get version number in ci checkout --- .forgejo/workflows/package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/package.yml b/.forgejo/workflows/package.yml index 7ab2c29..6bfff94 100644 --- a/.forgejo/workflows/package.yml +++ b/.forgejo/workflows/package.yml @@ -10,12 +10,14 @@ jobs: image: git.kabelsalat.ch/s3lph/package-pipeline-builder:latest steps: - uses: https://code.forgejo.org/actions/checkout@v4 + with: + fetch-depth: 0 - name: Prepare package run: | mkdir -p \ package/debian/barcode-utils/usr/bin \ package/debian/barcode-utils/usr/share/webextensions - sed -re "s/__VERSION__/0.$(git rev-list --count ${GITHUB_REF_NAME})-1/g" -i package/debian/barcode-utils/DEBIAN/control + sed -re "s/__VERSION__/0.$(git rev-list --count HEAD)-1/g" -i package/debian/barcode-utils/DEBIAN/control # barcode-websocket-server cp barcode-websocket-server package/debian/barcode-utils/usr/bin/ # webextension-tabfocus