Fix the `init` target
- correct check for whether target file is present - correct `makefile.shade` filename - do not copy master and release config files into every repo
This commit is contained in:
parent
f6ae75eac5
commit
456a38a249
|
|
@ -123,13 +123,20 @@ var buildTarget = "compile"
|
||||||
var sourceFile = Path.Combine(Directory.GetCurrentDirectory(), templatePath, fileName);
|
var sourceFile = Path.Combine(Directory.GetCurrentDirectory(), templatePath, fileName);
|
||||||
|
|
||||||
// Don't update the makefile
|
// Don't update the makefile
|
||||||
if(fileName.Equals("makefile.shake", StringComparison.OrdinalIgnoreCase) && File.Exists(targetFile))
|
if (fileName.Equals("makefile.shade", StringComparison.OrdinalIgnoreCase) && File.Exists(targetFile))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!File.Exists(sourceFile) ||
|
// Don't update extra configuration files
|
||||||
(File.ReadAllText(sourceFile) != File.ReadAllText(targetFile)))
|
if (fileName.Equals("NuGet.master.config", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
fileName.Equals("NuGet.release.config", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!File.Exists(targetFile) ||
|
||||||
|
(File.ReadAllText(sourceFile) != File.ReadAllText(targetFile)))
|
||||||
{
|
{
|
||||||
Log.Info("Updating " + fileName + " to " + repo);
|
Log.Info("Updating " + fileName + " to " + repo);
|
||||||
File.Copy(sourceFile, targetFile, true);
|
File.Copy(sourceFile, targetFile, true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue