From b6ad1c59822bc816574c91078261265dbdb4f061 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 20 Jan 2024 16:53:29 +0100 Subject: [PATCH] fix: fix version number in release (#275) Signed-off-by: Stefan Dej --- .github/workflows/Release.yml | 2 +- config/default | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 0a11af780..cdc7e0304 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -64,7 +64,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - ref: "master" + ref: master fetch-depth: 0 - name: Get latest tag diff --git a/config/default b/config/default index b472fb84a..0a27db612 100644 --- a/config/default +++ b/config/default @@ -4,6 +4,13 @@ get_version() { local ver + ver="$(realpath "$( dirname -- "${BASH_SOURCE[0]}")"/../src/version)" + + if [ -f "${ver}" ]; then + cat "${ver}" + return + fi + ver="$(realpath "$( dirname -- "${BASH_SOURCE[0]}")"/version)" cat "${ver}" }