Skip to content

Commit 655b872

Browse files
authored
chore: Minor Dotty tweak (#2946)
1 parent 88b613a commit 655b872

File tree

3 files changed

+33
-16
lines changed

3 files changed

+33
-16
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build the Build Tools solution
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- 'build/**'
9+
- '.github/workflows/scripts/**'
10+
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Add msbuild to PATH (required for MsiInstaller build)
24+
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
25+
26+
- name: Build the solution
27+
run: MSBuild.exe -restore -m -p:Configuration=Release -p:Platform="Any CPU" build/BuildTools.sln

.github/workflows/scripts/nugetSlackNotifications/Program.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,19 @@ static async Task<string> CreateGithubPullRequestForNewVersions(IEnumerable<Proj
256256
});
257257
}
258258

259-
var newTree = await ghClient.Git.Tree.Create(Owner, Repo, nt);
260-
var commitMessage = "test:Dotty instrumentation library updates for " + DateTime.Now.ToString("yyyy-MMM-dd");
261-
var newCommit = new NewCommit(commitMessage, newTree.Sha, masterReference.Object.Sha);
262-
var commit = await ghClient.Git.Commit.Create(Owner, Repo, newCommit);
263-
var branchref = await ghClient.Git.Reference.Update(Owner, Repo, $"heads/{branchName}", new ReferenceUpdate(commit.Sha));
259+
var commitMessage = "test: Dotty instrumentation library updates for " + DateTime.Now.ToString("yyyy-MMM-dd");
264260
Log.Information($"Successfully created {branchName} branch.");
265261

266262
var newPr = new NewPullRequest(commitMessage, branchName, "main");
267-
newPr.Body = "Dotty updated the following for your convenience.\n\n" + updateLog;
263+
newPr.Body = "Dotty updated the following for your convenience.\n\n" + updateLog + "\n\n**Don't forget to update the .NET Compatibility docs:docs: with the new versions!**\n";
268264
var pullRequest = await ghClient.PullRequest.Create(Owner, Repo, newPr);
269265
Log.Information($"Successfully created PR for {branchName} at {pullRequest.HtmlUrl}");
270266

271267
return pullRequest.HtmlUrl;
272268
}
273-
else
274-
{
275-
Log.Information($"Pull request will not be created: # of new versions={_newVersions.Count}, token available={_webhook != null}, test mode={_testMode}");
276-
return "";
277-
}
269+
270+
Log.Information($"Pull request will not be created: # of new versions={_newVersions.Count}, token available={_webhook != null}, test mode={_testMode}");
271+
return "";
278272
}
279273

280274
[Trace]

.github/workflows/scripts/nugetSlackNotifications/nugetSlackNotifications.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -25,8 +25,4 @@
2525
</None>
2626
</ItemGroup>
2727

28-
<ItemGroup>
29-
<Folder Include="Properties\" />
30-
</ItemGroup>
31-
3228
</Project>

0 commit comments

Comments
 (0)