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

Added hash only mode for compairing files. Fixed verbose logging. #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

skykingjwc
Copy link

We have a script that runs after a build which copies all our assemblies to a shared bin folder. This is where we prefer to deploy from. Unfortunately, this process resets all the dates on the files, so Kudusync think every single file is new. By comparing the file hash, and in conjunction with the MSBUILD /deterministic parameter, it is possible to compare the hashes of dll files, to determine if they have changed since the last build. I added a command line option to enable hash only mode, while leaving the existing timestamp comparison feature intact.
I also noticed that verbose logging was not working, so that was fixed as well. Also overrode the logger to copy its output to the debug console, to assist in debugging.

@@ -19,5 +19,14 @@ public static string ComputeSha1(this FileInfoBase file)
return BitConverter.ToString(sha1.ComputeHash(fileStream));
}
}

public static string ComputeSha256(this FileInfoBase file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given non-security related scenario, isn't the existing Sha1 method sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants