Update the timestamps in the nugets to Now

Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=40973

`nuget pack` is creating a package with timestamps in future. I am told that
this is a know issue with mono.  We will use this workaround until the mono
fix makes it onto the build bots.
This commit is contained in:
Bill Holmes 2016-05-11 13:22:59 -04:00
Родитель c1f44bc13f
Коммит f8fa0d666d
2 изменённых файлов: 36 добавлений и 0 удалений

Просмотреть файл

@ -53,6 +53,22 @@ Task ("tmp-nuget").IsDependentOn ("libs").Does (() =>
PackNuGets (newList.ToArray ());
});
Task ("nuget").IsDependentOn ("libs").IsDependentOn ("nuget-base").Does (() =>
{
var fixer = new FilePath ("../nuget-mono-fix.sh").MakeAbsolute (Context.Environment);
foreach (var nuget in buildSpec.NuGets) {
foreach (var file in GetFiles ("./output/" + nuget.NuSpec.GetFilenameWithoutExtension () + "*.nupkg")) {
StartProcess ("/bin/sh",
new ProcessSettings {
Arguments = string.Format ("{0} {1}", fixer, file),
}
);
}
}
});
Task ("component").IsDependentOn ("nuget").IsDependentOn ("tmp-nuget").IsDependentOn ("component-base");
FilePath GetCakeToolPath ()

20
nuget-mono-fix.sh Normal file
Просмотреть файл

@ -0,0 +1,20 @@
#!/bin/sh
curdir=$(pwd)
rm -rf nuget-mono-fix
FILES=`unzip -Z1 $1`
unzip $1 -d nuget-mono-fix
cd nuget-mono-fix
for filename in $FILES; do \
touch $filename; \
zip --delete $1 $filename; \
zip --update $1 $filename; \
done
cd $curdir
rm -rf nuget-mono-fix