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