This commit is contained in:
Dengke Tang
2023-02-28 17:14:55 -08:00
parent 071de01f6d
commit e4ae7108c5
2 changed files with 16 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -ex
BASENAME=${0}
TOOLS_DIR=$(dirname ${BASENAME})
WORK_DIR="${TOOLS_DIR}/.."
cd "${WORK_DIR}"
version_with_v=$(git describe --tags --abbrev=0)
VERSION=$(echo ${version_with_v} | cut -f2 -dv)
sed -i "s/#define CRT_VERSION .*/#define CRT_VERSION \"$VERSION\"/g" ext/crt.c
export VERSION="${VERSION}"