mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix: format version for rpm spec (#15330)
Co-authored-by: QIU Jian <qiujian@yunionyun.com>
This commit is contained in:
+6
-1
@@ -44,7 +44,12 @@ echo "Build root ${BUILDROOT}"
|
||||
if [ -z "$VERSION" ]; then
|
||||
TAG=$(git describe --abbrev=0 --tags || echo testing)
|
||||
VERSION=${TAG/\//-}
|
||||
VERSION=${VERSION/v/}
|
||||
if [[ "$VERSION" =~ ^v0. ]]; then
|
||||
VERSION=${VERSION/v0./}
|
||||
elif [[ "$VERSION" =~ ^v ]]; then
|
||||
VERSION=${VERSION/v/}
|
||||
fi
|
||||
VERSION=${VERSION//-/.}
|
||||
fi
|
||||
RELEASE=`date +"%y%m%d%H"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user