[build] fix rpm version for rc

This commit is contained in:
Tim Stack 2023-07-02 09:07:01 -07:00
parent c575ba0a50
commit e04e3f5753

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash
DEFAULT_VERSION=$(head -1 ../configure.ac | cut -d, -f2)
DEFAULT_VERSION=$(grep AC_INIT ../configure.ac | cut -d, -f2)
DEFAULT_VERSION=${DEFAULT_VERSION#[}
DEFAULT_VERSION=${DEFAULT_VERSION%]}
if [ "$GITHUB_REF_TYPE" == 'tag' ]; then
export LNAV_VERSION_NUMBER=${GITHUB_REF#refs/tags/v}
export LNAV_VERSION_NUMBER=$(echo ${GITHUB_REF#refs/tags/v} | sed -e 's/-/~/g')
else
export LNAV_VERSION_NUMBER="${DEFAULT_VERSION}^"$(date +%Y%m%d).git$(git rev-parse --short HEAD)
fi