Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Do not warn for local builds #7879

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions Utilities/git-version-gen.cmd
Expand Up @@ -47,8 +47,9 @@ if errorlevel 1 (

echo // This is a generated file. > "%GIT_VERSION_FILE%"
echo. >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_VERSION "unknown" >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_BRANCH "unknown" >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_VERSION ^"local_build^" >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_BRANCH ^"local_build^" >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_FULL_BRANCH ^"local_build^" >> "%GIT_VERSION_FILE%"
echo. >> "%GIT_VERSION_FILE%"
echo // If you don't want this file to update/recompile, change to 1. >> "%GIT_VERSION_FILE%"
echo #define RPCS3_GIT_VERSION_NO_UPDATE 0 >> "%GIT_VERSION_FILE%"
Expand Down
8 changes: 4 additions & 4 deletions rpcs3/git-version.cmake
@@ -1,6 +1,6 @@
set(RPCS3_GIT_VERSION "unknown")
set(RPCS3_GIT_BRANCH "unknown")
set(RPCS3_GIT_FULL_BRANCH "unknown")
set(RPCS3_GIT_VERSION "local_build")
set(RPCS3_GIT_BRANCH "local_build")
set(RPCS3_GIT_FULL_BRANCH "local_build")

find_package(Git)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
Expand Down Expand Up @@ -42,7 +42,7 @@ function(gen_git_version rpcs3_src_dir)
# BUILD_REPOSITORY_NAME will look like "RPCS3/rpcs3"
# BUILD_SOURCEBRANCHNAME will look like "master"
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables
if (DEFINED ENV{BUILD_REPOSITORY_NAME})
if (DEFINED ENV{BUILD_REPOSITORY_NAME} AND NOT "$ENV{BUILD_REPOSITORY_NAME}" STREQUAL "")
set(RPCS3_GIT_FULL_BRANCH "$ENV{BUILD_REPOSITORY_NAME}/$ENV{BUILD_SOURCEBRANCHNAME}")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/rpcs3qt/main_window.cpp
Expand Up @@ -93,7 +93,7 @@ void main_window::Init()
Q_EMIT RequestGlobalStylesheetChange(m_gui_settings->GetCurrentStylesheetPath());
ConfigureGuiFromSettings(true);

if (const std::string_view branch_name = rpcs3::get_full_branch(); branch_name != "RPCS3/rpcs3/master")
if (const std::string_view branch_name = rpcs3::get_full_branch(); branch_name != "RPCS3/rpcs3/master" && branch_name != "local_build")
{
gui_log.warning("Experimental Build Warning! Build origin: %s", branch_name);

Expand Down