version fixes

This commit is contained in:
Meliox 2026-06-07 17:50:31 +02:00
parent 73b9cece16
commit 1998db5ded
4 changed files with 21 additions and 1 deletions

View File

@ -37,6 +37,14 @@ jobs:
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -y debhelper dpkg-dev sudo apt-get install -y debhelper dpkg-dev
- name: Inject version into PVEMod_Config.pm
env:
BUILD_VERSION: ${{ steps.version.outputs.version }}
run: |
perl -i -pe 'BEGIN { $v = $ENV{BUILD_VERSION} }
s/(our \$VERSION\s*=\s*'"'"')[^'"'"']*'"'"';/$1'"'"'$v'"'"';/
' src/PVENodeInfo/PVEMod_Config.pm
- name: Build deb package - name: Build deb package
run: | run: |
dpkg-buildpackage -us -uc -b dpkg-buildpackage -us -uc -b

View File

@ -22,6 +22,15 @@ jobs:
- name: Install build deps - name: Install build deps
run: sudo apt-get install -y devscripts debhelper build-essential run: sudo apt-get install -y devscripts debhelper build-essential
- name: Inject version into PVEMod_Config.pm
run: |
VERSION=$(grep -m1 '(' debian/changelog | sed 's/.*(\(.*\)).*/\1/')
SHORT_SHA=$(git rev-parse --short HEAD)
export BUILD_VERSION="${VERSION}-test-${SHORT_SHA}"
perl -i -pe 'BEGIN { $v = $ENV{BUILD_VERSION} }
s/(our \$VERSION\s*=\s*'"'"')[^'"'"']*'"'"';/$1'"'"'$v'"'"';/
' src/PVENodeInfo/PVEMod_Config.pm
- name: Build package - name: Build package
run: dpkg-buildpackage -us -uc -b run: dpkg-buildpackage -us -uc -b

View File

@ -18,7 +18,7 @@ our @EXPORT_OK = qw(
# ============================================================================ # ============================================================================
our $DEBUG_ENABLED = 1; our $DEBUG_ENABLED = 1;
our $VERSION = '1.0'; our $VERSION = 'version-placeholder';
# Runtime process-type tag — set to 'worker' or 'collector' after fork. # Runtime process-type tag — set to 'worker' or 'collector' after fork.
# Each forked child gets its own copy of this variable. # Each forked child gets its own copy of this variable.

View File

@ -193,8 +193,11 @@ sub get_ups_info {
sub get_pve_mod_version { sub get_pve_mod_version {
debug(__LINE__, "get_pve_mod_version called"); debug(__LINE__, "get_pve_mod_version called");
# Notify pve_mod_worker of activity # Notify pve_mod_worker of activity
notify_pve_mod_worker(); notify_pve_mod_worker();
debug(__LINE__, "Returning version: $VERSION");
return $VERSION; return $VERSION;
} }