Skip to content

Commit

Permalink
*scafold updated (images were corupted)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarancek committed Jun 11, 2024
2 parents 11cfebe + 81dc0e7 commit ebc61ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scaffolder/TcOpen.Scaffold/src/TcOpen.Scaffold/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public string DownloadRepositorySource()
}

Console.WriteLine($"Unpacking '{zippedBranchFile}' to '{CurrentDirectory}'");

System.IO.Compression.ZipFile.ExtractToDirectory(zippedBranchFile, CurrentDirectory);
File.Delete(zippedBranchFile);
return templateProjectFolder;
Expand All @@ -122,7 +122,7 @@ public string DownloadReleaseTemplate()

Console.WriteLine($"Unpacking '{zippedReleaseFile}' to '{unpackFolder}'");
System.IO.Compression.ZipFile.ExtractToDirectory(zippedReleaseFile, unpackFolder);
File.Delete(zippedReleaseFile);
File.Delete(zippedReleaseFile);

return unpackFolder;
}
Expand Down Expand Up @@ -153,8 +153,9 @@ public void ReplaceTemplateTags(string projectFolder)
{
RenameDirectories(projectFolder);
ReplaceFileNames(projectFolder);

var files = Directory.EnumerateFiles(projectFolder, "*.*", SearchOption.AllDirectories);
string[] imageExtensions = { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif" };
var files = Directory.EnumerateFiles(projectFolder, "*.*", SearchOption.AllDirectories)
.Where(file => !imageExtensions.Contains(Path.GetExtension(file).ToLowerInvariant())); ;

foreach (var file in files)
{
Expand Down

0 comments on commit ebc61ad

Please sign in to comment.