Skip to content

Commit

Permalink
Remove git build info from spell data dump
Browse files Browse the repository at this point in the history
  • Loading branch information
gastank committed Sep 7, 2024
1 parent 564ecc0 commit b5d9489
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion SpellDataDump/build_info.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SimulationCraft 1100-02 for World of Warcraft 11.0.2.56461 Live (hotfix 2024-09-07/56461, git build data-update-live-56461 8aa1979)
SimulationCraft 1100-02 for World of Warcraft 11.0.2.56461 Live (hotfix 2024-09-07/56461)
6 changes: 3 additions & 3 deletions engine/sc_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ void print_version_info( const dbc_t& dbc )
fmt::print( "{}", util::version_info_str( &dbc ) );
}

void print_build_info ( const dbc_t& dbc )
void print_build_info( const dbc_t& dbc, int display_level )
{
fmt::print( " ({})", util::build_info_str( &dbc ) );
fmt::print( " ({})", util::build_info_str( &dbc, display_level ) );
}

} // anonymous namespace ====================================================
Expand Down Expand Up @@ -295,7 +295,7 @@ int sim_t::main( const std::vector<std::string>& args )
print_version_info( *dbc );

if ( display_build > 0 )
print_build_info( *dbc );
print_build_info( *dbc, display_build );

// newline as print_version_info does not include it
fmt::print( "\n" );
Expand Down
2 changes: 1 addition & 1 deletion engine/sim/sim.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ struct sim_t : private sc_thread_t
std::string output_file_str, html_file_str, json_file_str;
std::string reforge_plot_output_file_str;
std::vector<std::string> error_list;
int display_build;
int display_build; // 0: none, 1: normal (default), 2: version + hotfix only
int report_precision;
int report_pets_separately;
int report_targets;
Expand Down
4 changes: 2 additions & 2 deletions engine/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ std::string util::version_info_str( const dbc_t* dbc )
dbc::client_data_version_str( dbc->ptr ), dbc->wow_ptr_status() );
}

std::string util::build_info_str( const dbc_t* dbc )
std::string util::build_info_str( const dbc_t* dbc, int display_level )
{
if ( !dbc )
{
Expand All @@ -244,7 +244,7 @@ std::string util::build_info_str( const dbc_t* dbc )
fmt::format( "hotfix {}/{}", dbc::hotfix_date_str( dbc->ptr ), dbc::hotfix_build_version( dbc->ptr ) ) );
}

if ( git_info::available() )
if ( git_info::available() && display_level != 2 )
{
build_strings.emplace_back( fmt::format( "git build {} {}", git_info::branch(), git_info::revision() ) );
}
Expand Down
2 changes: 1 addition & 1 deletion engine/util/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ stat_e highest_stat( const player_t* p, util::span<const stat_e> stat );
stat_e lowest_stat( const player_t* p, util::span<const stat_e> stat );

std::string version_info_str( const dbc_t* dbc );
std::string build_info_str( const dbc_t* dbc );
std::string build_info_str( const dbc_t* dbc, int display_level );

const char* attribute_type_string ( attribute_e type );
const char* dot_behavior_type_string ( dot_behavior_e t );
Expand Down
2 changes: 1 addition & 1 deletion qt/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ void SC_MainWindow::simulateFinished( std::shared_ptr<sim_t> sim )
QString errorDetails;
errorDetails += "# SimulationCraft encountered an error!\n";
errorDetails += "# " + QString::fromStdString( util::version_info_str( sim->dbc.get() ) ) + "\n";
errorDetails += "# " + QString::fromStdString( util::build_info_str( sim->dbc.get() ) ) + "\n";
errorDetails += "# " + QString::fromStdString( util::build_info_str( sim->dbc.get(), sim->display_build ) ) + "\n";
errorDetails += QString( "* Category: %1\n" ).arg( simulateThread->getErrorCategory() );
errorDetails += QString( "* Error: %1\n\n" ).arg( simulateThread->getError() );
errorDetails += "## All options used for simulation:\n";
Expand Down

0 comments on commit b5d9489

Please sign in to comment.