|
|
|
@ -160,11 +160,10 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency |
|
|
|
|
|
|
|
var nugetVersion = version; |
|
|
|
|
|
|
|
|
|
|
|
var localCacheFile = Path.Combine(CliPaths.TemplateCache, name.Replace("/", ".") + ".zip"); |
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
if (File.Exists(localCacheFile)) |
|
|
|
if (File.Exists(localCacheFile) && templateSource.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion); |
|
|
|
} |
|
|
|
@ -176,6 +175,16 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency |
|
|
|
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion); |
|
|
|
} |
|
|
|
|
|
|
|
if (!skipCache && !templateSource.IsNullOrWhiteSpace() && type == SourceCodeTypes.Template) |
|
|
|
{ |
|
|
|
var templateFilePath = templateSource.EndsWith(".zip") |
|
|
|
? templateSource |
|
|
|
: Path.Combine(templateSource, name.Replace("/", ".").EnsureEndsWith('-') + version + ".zip"); |
|
|
|
|
|
|
|
Logger.LogInformation("Using cached template: " + name + ", version: " + version + " from template source: " + templateFilePath); |
|
|
|
return new TemplateFile(File.ReadAllBytes(templateFilePath), version, latestVersion, nugetVersion); |
|
|
|
} |
|
|
|
|
|
|
|
Logger.LogInformation("Downloading " + type + ": " + name + ", version: " + version); |
|
|
|
|
|
|
|
var fileContent = await DownloadSourceCodeContentAsync( |
|
|
|
|