summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets
diff options
context:
space:
mode:
Diffstat (limited to '.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets')
-rwxr-xr-x.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets40
1 files changed, 40 insertions, 0 deletions
diff --git a/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets
new file mode 100755
index 0000000000..68a98080f3
--- /dev/null
+++ b/.packages/microsoft.dotnet.buildtools/3.0.0-preview4-04022-01/lib/CommitBuildValues.targets
@@ -0,0 +1,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 &quot;dotnet-bot&quot;" />
+
+ <Exec
+ WorkingDirectory="$(SourceDir)"
+ StandardOutputImportance="Low"
+ Command="git config user.email &quot;dotnet-bot@microsoft.com&quot;" />
+
+ <!-- commit and push to origin -->
+ <Exec
+ WorkingDirectory="$(SourceDir)"
+ StandardOutputImportance="Low"
+ Command="git checkout $(GitWorkingBranch)" />
+
+ <Exec
+ WorkingDirectory="$(SourceDir)"
+ StandardOutputImportance="Low"
+ Command="git commit -m &quot;Automated commit of revision number value $(RevisionNumber).&quot; $(SourceDir)BuildValues.props" />
+
+ <Exec
+ WorkingDirectory="$(SourceDir)"
+ StandardOutputImportance="Low"
+ Command="git push $(GitPushRemote) $(GitWorkingBranch)" />
+
+ </Target>
+</Project>