fix: prevent tilde expansion in DEB version substitution (#5913)

The DEB version substitution used ${VERSION/-/~} which caused bash
to expand ~ to $HOME (e.g. /home/runner), producing an invalid
version string like '1.0.0/home/runnerrc.1'.

Store ~ in a variable first to prevent tilde expansion.
This commit is contained in:
hector
2026-08-10 11:11:49 +08:00
committed by GitHub
parent d51191f81b
commit 63b564d064
+3 -1
View File
@@ -225,7 +225,9 @@ jobs:
VERSION="${{ needs.resolve.outputs.version }}"
DEB_ARCH="${{ matrix.deb_arch }}"
# DEB version: replace - with ~ (1.0.0-beta.12 -> 1.0.0~beta.12)
DEB_VERSION="${VERSION/-/~}"
# Use a variable for ~ to prevent tilde expansion by bash
TILDE='~'
DEB_VERSION="${VERSION/-/$TILDE}"
PKG_DIR="rustfs_${DEB_VERSION}_${DEB_ARCH}"
echo "Building DEB: ${PKG_DIR}.deb"