blob: 68a98080f3ad68f245a0a9a364fefd449d1c730b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GitWorkingBranch Condition="'$(GitWorkingBranch)' == ''">master</GitWorkingBranch>
<GitPushRemote Condition="'$(GitPushRemote)' == ''">origin</GitPushRemote>
</PropertyGroup>
<Target Name="CommitBuildValues"
AfterTargets="BuildPackages"
Condition="'$(UpdateBuildValues)' == 'true'"
>
<!-- configure the commit to show up as the dotnet bot -->
<Exec
WorkingDirectory="$(SourceDir)"
StandardOutputImportance="Low"
Command="git config user.name "dotnet-bot"" />
<Exec
WorkingDirectory="$(SourceDir)"
StandardOutputImportance="Low"
Command="git config user.email "dotnet-bot@microsoft.com"" />
<!-- commit and push to origin -->
<Exec
WorkingDirectory="$(SourceDir)"
StandardOutputImportance="Low"
Command="git checkout $(GitWorkingBranch)" />
<Exec
WorkingDirectory="$(SourceDir)"
StandardOutputImportance="Low"
Command="git commit -m "Automated commit of revision number value $(RevisionNumber)." $(SourceDir)BuildValues.props" />
<Exec
WorkingDirectory="$(SourceDir)"
StandardOutputImportance="Low"
Command="git push $(GitPushRemote) $(GitWorkingBranch)" />
</Target>
</Project>
|