Skip to content

configure/cpack_win.cmake: Use package name which includes the git tag if available

Thomas Braun requested to merge fix-windows-package-naming-on-tag into release/9.5.0

Ever since we added support for automatic package upload in gitlab CI in 295b1de7 (.windows-gitlab-ci.yml: Upload msi/zip packages from windows build on tag, 2023-08-23) we have assumed that the package name on windows also includes the tag.

But that is not the case, as can be seen for the TangoSourceDistribution (TSD) 1 CI job which gives:

$ try { .\windows\create_installer.ps1 } catch { Write-Host -Foreground Red $_; Exit 1 }
    Directory: C:\tango_windows_installer_workspace
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----         9/3/2023   6:07 PM                deps
id               : 2088424
name             : libtango_9.5.0-rc1_v142_x64_shared_release.zip
url              : https://gitlab.com/api/v4/projects/24006041/packages/generic/cppTango/9.5.0-rc1/libtango_9.5.0-rc1_v
                   142_x64_shared_release.zip
direct_asset_url : https://gitlab.com/api/v4/projects/24006041/packages/generic/cppTango/9.5.0-rc1/libtango_9.5.0-rc1_v
                   142_x64_shared_release.zip
link_type        : other

For previous releases it was either no problem as that was before the windows installer support in TSD (9.3.x) or the library version was the same as the tag (9.4.2). The only case which was broken before was 9.4.2-rc2 2. In that case the package was renamed locally to have the correct naming (by the author of this commit).

The fix now ensure that the package name always contains the tag if this is a pipeline for a tag.

Close #1165 (closed).

Edited by Thomas Braun

Merge request reports