Define __RGBDS_VERSION__ as the output of rgbasm --version (sans "rgbasm")

Fixes #824
This commit is contained in:
Rangi
2021-04-09 12:08:11 -04:00
committed by Eldred Habert
parent de7d1facf3
commit bcb78f5d18
3 changed files with 4 additions and 0 deletions

View File

@@ -38,12 +38,14 @@ tryCmp () {
# Add the version constants test, outputting the closest tag to the HEAD
if git describe --tags --abbrev=0 > version.out; then
$RGBASM --version >> version.out
cat > version.asm <<EOF
IF !DEF(__RGBDS_RC__)
PRINTLN "v{d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}"
ELSE
PRINTLN "v{d:__RGBDS_MAJOR__}.{d:__RGBDS_MINOR__}.{d:__RGBDS_PATCH__}-rc{d:__RGBDS_RC__}"
ENDC
PRINTLN "rgbasm {__RGBDS_VERSION__}"
EOF
else
echo "${bold}${orange}Warning: cannot run version test!${rescolors}${resbold}"