Skip to content

Commit 5808198

Browse files
fix: correct VERSION_NUMBER quoting
1 parent 4d71349 commit 5808198

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ jobs:
393393
# Use cmd to call vcvarsall and then cl
394394
$outName = "win-witr-${{ matrix.arch }}.exe"
395395
$ver = "${{ needs.prepare.outputs.version_number }}"
396-
cmd /c "`"$vcvarsPath`" $vcvarsArch && cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /DVERSION_NUMBER=\"$ver\" /Fe:$outName"
396+
cmd /c "`"$vcvarsPath`" $vcvarsArch && cl /O2 /Ot /GL /std:c++20 /EHsc main.cpp /DUNICODE /D_UNICODE /DVERSION_NUMBER=`"$ver`" /Fe:$outName"
397397
if ($LASTEXITCODE -ne 0) {
398398
Write-Host "Build failed with exit code $LASTEXITCODE"
399399
Exit $LASTEXITCODE

main.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,9 @@ This is kept as a bunch of strings to be easier to call than a dictionary, map,
9393
Less words to type ;)
9494
*/
9595
std::string forkAuthor = ""; // if this is a fork of this project, put your name here! Please be nice and leave my name too :)
96-
#define STRINGIZE2(x) #x
97-
#define STRINGIZE(x) STRINGIZE2(x)
9896
std::string version = []() {
9997
#ifdef VERSION_NUMBER
100-
return std::string(STRINGIZE(VERSION_NUMBER)); // Release builds only
98+
return std::string(VERSION_NUMBER); // Release builds only
10199
#else
102100
return std::string("dev-build"); // Local builds - no env var check
103101
#endif

0 commit comments

Comments
 (0)