mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-10 17:05:12 +00:00
95c57c182c
When building directly from the repo (either from a git clone or a download of the zip of the repository) the version reported is very misleading because it will not have a version label, suggesting it is actually a 'release' version when in fact it could be anything. The ./.ci/calculate-version.sh logic is already setup to delete an existing ./internal/version.txt during a detected release build, so we can just place one in the repositroy and it won't impact the versioning of CI and release builds, but will show up when building locally. Fixes: #63
22 lines
602 B
QBasic
22 lines
602 B
QBasic
DIM SHARED Version AS STRING
|
|
DIM SHARED IsCiVersion AS _BYTE
|
|
|
|
Version$ = "0.6.0"
|
|
$VERSIONINFO:FileVersion#=0,6,0,0
|
|
$VERSIONINFO:ProductVersion#=0,6,0,0
|
|
|
|
' If ./internal/version.txt exist, then this is some kind of CI build with a label
|
|
If _FILEEXISTS("internal/version.txt") THEN
|
|
versionfile = FREEFILE
|
|
OPEN "internal/version.txt" FOR INPUT AS #versionfile
|
|
|
|
LINE INPUT #versionfile, VersionLabel$
|
|
Version$ = Version$ + VersionLabel$
|
|
|
|
if VersionLabel$ <> "" AND VersionLabel$ <> "-UNKNOWN" then
|
|
IsCiVersion = -1
|
|
end if
|
|
|
|
CLOSE #versionfile
|
|
END IF
|