File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed
Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ export LANG
1414# Compute commit distances
1515for platform in $ALL_DOTNET_PLATFORMS ; do
1616 PLATFORM=$( echo " $platform " | tr ' [:lower:]' ' [:upper:]' )
17- COMMIT=$( git blame -- ./Make.versions HEAD | grep " ${PLATFORM} _NUGET_OS_VERSION=" | sed ' s/ .*//' )
17+ COMMIT=$( git blame -- ./Make.versions HEAD | grep " ${PLATFORM} _NUGET_OS_VERSION=" | sed ' s/ .*//' | sed ' s/^\^// ' )
1818 COMMIT_DISTANCE=$( git log " $COMMIT ..HEAD" --oneline | wc -l | sed -e ' s/ //g' )
1919 TOTAL_DISTANCE=$(( NUGET_VERSION_COMMIT_DISTANCE_START+ COMMIT_DISTANCE))
2020 printf " ${PLATFORM} _NUGET_COMMIT_DISTANCE:=$TOTAL_DISTANCE \\ n" >> " $OUTPUT_FILE "
2121done
2222
23- STABLE_COMMIT=$( git blame -L ' /^[#[:blank:]]*NUGET_RELEASE_BRANCH=/,+1' -- ./Make.config HEAD | sed ' s/ .*//' )
23+ STABLE_COMMIT=$( git blame -L ' /^[#[:blank:]]*NUGET_RELEASE_BRANCH=/,+1' -- ./Make.config HEAD | sed ' s/ .*//' | sed ' s/^\^// ' )
2424STABLE_COMMIT_DISTANCE=$( git log " $STABLE_COMMIT ..HEAD" --oneline | wc -l | sed -e ' s/ //g' )
2525STABLE_TOTAL_DISTANCE=$(( STABLE_COMMIT_DISTANCE+ NUGET_VERSION_STABLE_COMMIT_DISTANCE_START))
2626
Original file line number Diff line number Diff line change 1+ <!-- All msbuild target logic needs to be inside a project tag -->
2+ <Project DefaultTargets =" WriteProjectReferences" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+
4+ <!-- Import the project we want to inspect -->
5+ <Import Project =" $(ProjectFile)" Condition =" '$(ProjectFile)' != ''" />
6+
7+ <!-- Iterates over project references, and output them to the 'ProjReferences' output variable -->
8+ <Target Name =" IterateOverReferencedProjects" Condition =" '$(ProjectFile)' != '' And '@(ProjectReference)' != ''" >
9+ <MSBuild Projects =" $(MSBuildProjectFile)" Properties =" ProjectFile=$([System.IO.Path]::GetFullPath('$([System.IO.Path]::GetDirectoryName ($(ProjectFile)))/%(ProjectReference.Identity)'))" Targets =" WriteProjectReferences" RebaseOutputs =" true" >
10+ <Output ItemName =" ProjReferences" TaskParameter =" TargetOutputs" />
11+ </MSBuild >
12+ </Target >
13+
14+ <!-- Writes the list of project references to 'ReferenceListPath' -->
15+ <Target Name =" WriteProjectReferences" Condition =" '$(ProjectFile)' != ''" DependsOnTargets =" IterateOverReferencedProjects" Outputs =" @(ProjReferences)" >
16+ <CreateItem Include =" $([System.IO.Path]::GetFullPath('$([System.IO.Path]::GetDirectoryName ($(ProjectFile)))/%(ProjectReference.Identity)'))" Condition =" '%(ProjectReference.Identity)' != ''" >
17+ <Output ItemName =" ProjReferences" TaskParameter =" Include" />
18+ </CreateItem >
19+ <WriteLinesToFile File =" $(ReferenceListPath)" Lines =" @(ProjReferences)" Overwrite=" True" Condition =" '$(ReferenceListPath)' != ''" />
20+ </Target >
21+
22+ <!-- Write the list of input files to 'InputsPath' -->
23+ <Target Name =" WriteInputs" >
24+ <WriteLinesToFile
25+ File=" $(InputsPath)"
26+ Lines=" @(ProjectReference->'%(FullPath)');@(Compile->'%(FullPath)');@(EmbeddedResource->'%(FullPath)')"
27+ Overwrite=" True"
28+ />
29+ </Target >
30+ </Project >
You can’t perform that action at this time.
0 commit comments