Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

GitInstaller should prefer local resources before downloading #590

Closed
wants to merge 6 commits into from

Conversation

StanleyGoldman
Copy link
Contributor

@StanleyGoldman StanleyGoldman commented Feb 23, 2018

  • Added functionality to GitInstaller to check locally for git and git lfs zip files
  • If one or both are found the GitInstaller will download the respective files
  • Afterwards it resumes as expected.

gitArchiveFilePath = AssemblyResources.ToFile(ResourceType.Platform, "git.zip", archiveParentPath, environment);
if (!gitArchiveFilePath.FileExists())
{
gitArchiveFilePath = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this file exists check be moved into AssemblyResources.ToFile(...)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also was not sure if the usage of AssemblyResources.ToFile(...) be used here inside GitInstaller or the result sent into the constructor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also was not sure if the usage of AssemblyResources.ToFile(...) be used here inside GitInstaller or the result sent into the constructor.

Now that I say that out loud I feel the like call should be outside GitInstaller...

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I agree it probably should be outside, this should only be concerned with extracting a zip given a file path.

@StanleyGoldman StanleyGoldman requested a review from shana February 23, 2018 22:51
@StanleyGoldman StanleyGoldman force-pushed the fixes/prefer-local-resources branch from d7066db to ec4038c Compare February 27, 2018 13:12
}

var gitLfsArchivePath = AssemblyResources.ToFile(ResourceType.Platform, "git-lfs.zip", archiveParentPath, Environment);
if (!gitLfsArchivePath.FileExists())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This feels a bit better.. Maybe a static method in GitInstaller would be better than this...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ehh...

@shana
Copy link
Member

shana commented Mar 7, 2018

This has been manually ported to #609

@shana shana closed this Mar 7, 2018
@shana shana deleted the fixes/prefer-local-resources branch March 7, 2018 15:31
@shana shana mentioned this pull request Mar 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants