Skip to content
Snippets Groups Projects
Commit 168cb56a authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Fix: File hashing and formatting

parent 6ea75661
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,7 @@ public class Deployer
{
_logger.LogInformation("Running in Dummy Mode. No changes will be made.");
}
_logger.LogDebug("Redeploy: {redeploy}", opts.Redeploy);
// Override the working folder if specified in the configuration
if (!string.IsNullOrWhiteSpace(_graphDeployerConfiguration.WorkingFolder))
......@@ -123,6 +124,8 @@ public class Deployer
var graphId = kv.Key.ToString();
var currentRun = new Dictionary<string, string>();
_logger.LogDebug("Deploying graph: {graphName}", graphId);
// Get the hash of the currently deployed graph and compare it with the hash of the graph to be deployed
files.ForEach((path) => currentRun.TryAdd(graphId, HashUtil.GetFileHash(path)));
......@@ -131,7 +134,7 @@ public class Deployer
if (hasChanged)
{
_logger.LogDebug("The graph hase changed");
_logger.LogDebug("The graph has changed");
} else
{
_logger.LogDebug("The graph has not changed");
......@@ -139,13 +142,12 @@ public class Deployer
if(deployedGraph is null)
{
_logger.LogDebug("deployedGraph is null");
_logger.LogDebug("Deployed graph is null");
} else {
_logger.LogDebug("Deployed hash: {hash}", string.Join(',', deployedGraph.FileHashes));
}
_logger.LogDebug("Incoming hash: {hash}", currentRun[graphId]);
_logger.LogDebug("Redeploy: {redeploy}", opts.Redeploy);
// Deploy the graph if it has changed or if the redeploy flag is set
if (hasChanged)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment