mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-11 17:49:38 -06:00
ctest_update: Add CTEST_UPDATE_VERSION_ONLY option to only note the version
This allows ctest_update to get the current version without actually changing the repository. This is useful when using Jenkins or an external project to update the source to a specific version, but you still want the current version to show up in CDash.
This commit is contained in:
@@ -55,6 +55,8 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
|
||||
"GITUpdateOptions", "CTEST_GIT_UPDATE_OPTIONS");
|
||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||
"GITUpdateCustom", "CTEST_GIT_UPDATE_CUSTOM");
|
||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||
"UpdateVersionOnly", "CTEST_UPDATE_VERSION_ONLY");
|
||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||
"HGCommand", "CTEST_HG_COMMAND");
|
||||
this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile,
|
||||
|
||||
@@ -166,10 +166,17 @@ void cmCTestVC::CleanupImpl()
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmCTestVC::Update()
|
||||
{
|
||||
this->NoteOldRevision();
|
||||
this->Log << "--- Begin Update ---\n";
|
||||
bool result = this->UpdateImpl();
|
||||
this->Log << "--- End Update ---\n";
|
||||
bool result = true;
|
||||
// if update version only is on then do not actually update,
|
||||
// just note the current version and finish
|
||||
if(!cmSystemTools::IsOn(
|
||||
this->CTest->GetCTestConfiguration("UpdateVersionOnly").c_str()))
|
||||
{
|
||||
this->NoteOldRevision();
|
||||
this->Log << "--- Begin Update ---\n";
|
||||
result = this->UpdateImpl();
|
||||
this->Log << "--- End Update ---\n";
|
||||
}
|
||||
this->NoteNewRevision();
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user