Skip to content

Commit

Permalink
remove commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Imrglop committed Dec 1, 2024
1 parent 94a87cb commit 08db5f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/releasebuild.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build Latite from source

on:
Expand Down Expand Up @@ -28,11 +32,10 @@ jobs:
- name: Add MSBuild to PATH
uses: microsoft/[email protected]

- name: Fetch Commit Hash
run: echo "COMMIT_HASH=${{ github.sha }}" >> $GITHUB_ENV

- name: Set Additional Compiler Options
run: set ExternalCompilerOptions=/DCOMMIT_HASH=${{github.sha}}
# - name: Restore NuGet packages
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: nuget restore ${{env.SOLUTION_FILE_PATH}}
# apparently this thing isnt really needed

- name: Build Latite
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand All @@ -44,4 +47,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Latite-Release
path: D:\a\Latite\Latite\x64\Release\LatiteRewrite.dll
path: D:\a\Latite\Latite\x64\Release\LatiteRewrite.dll
6 changes: 1 addition & 5 deletions src/client/Latite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,8 @@ void Latite::threadsafeInit() {

auto app = winrt::Windows::UI::ViewManagement::ApplicationView::GetForCurrentView();
std::string vstr(this->version);
#define STRINGIFY(x) #x
#ifdef LATITE_NIGHTLY
#ifndef COMMIT_HASH
#error Invalid nightly build - No Commit Hash
#endif
auto ws = util::StrToWStr("Latite Client [NIGHTLY] commit #" + STRINGIFY(COMMIT_HASH) + " game version " + gameVersion);
auto ws = util::StrToWStr("Latite Client [NIGHTLY] " + std::string(__DATE__) + " " + std::string(__TIME__) + " game version " + gameVersion);
#else
auto ws = util::StrToWStr("Latite Client " + vstr);
#endif
Expand Down

0 comments on commit 08db5f3

Please sign in to comment.