From f4d43b38286e66f16cc9d51b8ce2ec17e7266e57 Mon Sep 17 00:00:00 2001 From: Andrew Lewycky Date: Thu, 9 May 2024 13:02:05 -0400 Subject: [PATCH] Detect current version in CI build-dkms --- .github/workflows/test.yml | 4 ++-- tools/current-version | 6 ++++++ tools/make-installer | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 tools/current-version diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe67c5d..7974981 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: sudo apt update sudo apt install -y dkms sudo dkms add . - sudo dkms install tenstorrent/1.27.1 + sudo dkms install tenstorrent/$(tools/current-version) build-make: strategy: @@ -34,4 +34,4 @@ jobs: - uses: actions/upload-artifact@v4 with: name: driver-${{ matrix.os }} - path: tenstorrent.ko \ No newline at end of file + path: tenstorrent.ko diff --git a/tools/current-version b/tools/current-version new file mode 100755 index 0000000..af88652 --- /dev/null +++ b/tools/current-version @@ -0,0 +1,6 @@ +#! /bin/bash + +# SPDX-FileCopyrightText: © 2024 Tenstorrent Inc. +# SPDX-License-Identifier: GPL-2.0-only + +sed -nE "s/^[[:space:]]*PACKAGE_VERSION[[:space:]]*=[[:space:]]*\"([^\"]+)\"/\\1/p" dkms.conf diff --git a/tools/make-installer b/tools/make-installer index 8c6e91e..346a445 100755 --- a/tools/make-installer +++ b/tools/make-installer @@ -1,6 +1,6 @@ #! /bin/bash -# SPDX-FileCopyrightText: © 2023 Tenstorrent Inc. +# SPDX-FileCopyrightText: © 2024 Tenstorrent Inc. # SPDX-License-Identifier: GPL-2.0-only set -e @@ -32,7 +32,7 @@ if (( ($deploy_motor && $# > 0) || (!$deploy_motor && $# != 1) )); then exit 1 fi -package_version=$(sed -nE "s/^[[:space:]]*PACKAGE_VERSION[[:space:]]*=[[:space:]]*\"([^\"]+)\"/\\1/p" dkms.conf) +package_version=$(tools/current-version) archive=$(tools/make-source-release -m) archive_basename=$(basename "$archive")