diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a238a9d7..07d1243c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,8 +38,7 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 - name: Generate project files - #run: tools/premake5 vs2022 --ci-build - run: tools/premake5 vs2022 + run: tools/premake5 vs2022 --ci-build - name: Set up problem matching uses: ammaraskar/msvc-problem-matcher@master diff --git a/premake5.lua b/premake5.lua index aeefb70d..ce950058 100644 --- a/premake5.lua +++ b/premake5.lua @@ -77,6 +77,11 @@ newoption { description = "Enable development builds of the client." } +newoption { + trigger = "ci-build", + description = "Enable CI builds of the client." +} + newaction { trigger = "version", description = "Returns the version string for the current commit of the source code.", @@ -244,7 +249,7 @@ workspace "boiii" defines {"DEV_BUILD"} end - if os.getenv("CI") then + if _OPTIONS["ci-build"] then defines {"CI"} end diff --git a/src/client/component/updater.cpp b/src/client/component/updater.cpp index ed5395b6..aacd01c7 100644 --- a/src/client/component/updater.cpp +++ b/src/client/component/updater.cpp @@ -73,10 +73,7 @@ namespace updater auto res = utils::compression::zip::extract(data); if (res.size() == 1) { - for (auto& file : res) - { - return std::move(file.second); - } + return std::move(res.begin()->second); } throw std::runtime_error("Invalid data"); @@ -195,6 +192,6 @@ namespace updater }; } -#if !defined(DEBUG) && defined(CI) +#if defined(NDEBUG) && defined(CI) REGISTER_COMPONENT(updater::component) #endif