forked from qt-creator/qt-creator
TarPackageDeployStep: Get rid of isDeploymentNecessary()
Make it a part of deployRecipe(). Change-Id: I131cb34171e3d4e09c6e8fa8a13dbfd768d55aa4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -53,7 +53,6 @@ public:
|
||||
|
||||
private:
|
||||
QString remoteFilePath() const;
|
||||
bool isDeploymentNecessary() const final;
|
||||
GroupItem deployRecipe() final;
|
||||
GroupItem uploadTask();
|
||||
GroupItem installTask();
|
||||
@@ -66,11 +65,6 @@ QString TarPackageDeployStep::remoteFilePath() const
|
||||
return QLatin1String("/tmp/") + m_packageFilePath.fileName();
|
||||
}
|
||||
|
||||
bool TarPackageDeployStep::isDeploymentNecessary() const
|
||||
{
|
||||
return hasLocalFileChanged(DeployableFile(m_packageFilePath, {}));
|
||||
}
|
||||
|
||||
GroupItem TarPackageDeployStep::uploadTask()
|
||||
{
|
||||
const auto setupHandler = [this](FileTransfer &transfer) {
|
||||
@@ -117,7 +111,13 @@ GroupItem TarPackageDeployStep::installTask()
|
||||
|
||||
GroupItem TarPackageDeployStep::deployRecipe()
|
||||
{
|
||||
return Group { uploadTask(), installTask() };
|
||||
const auto onSetup = [this] {
|
||||
if (hasLocalFileChanged(DeployableFile(m_packageFilePath, {})))
|
||||
return SetupResult::Continue;
|
||||
addSkipDeploymentMessage();
|
||||
return SetupResult::StopWithDone;
|
||||
};
|
||||
return Group { onGroupSetup(onSetup), uploadTask(), installTask() };
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user