Skip to content

Commit 8ed343d

Browse files
committed
Merge branch 'release/0.27.0'
* release/0.27.0: (#145) Enable skipping of Yarn analysis (maint) synced local '.templates/' with remote '.github/GitReleaseManager/.templates/' (maint) Remove unnecessary comma from output (build) Switch to deleting old labels (maint) created local '.github/workflows/label-sync.yml' from remote '.github/workflows/label-sync.yml'
2 parents 9745f43 + ba471f2 commit 8ed343d

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

.github/workflows/label-sync.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync labels
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# Run at the end of the day (most likely UTC)
6+
- cron: "0 0 * * *"
7+
8+
jobs:
9+
labels:
10+
# We use ubuntu as the image, as it is typically faster and cheaper (on private repos).
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# uncomment the uses line if additional configuration in the current
15+
# repository is used.
16+
#- uses: actions/[email protected]
17+
- uses: EndBug/[email protected]
18+
with:
19+
config-file: |
20+
https://raw.githubusercontent.com/chocolatey/.github/main/.github/labels.yml
21+
request-token: ${{ secrets.SYNC_TOKEN }} # Used when getting the config files.
22+
delete-other-labels: true # After initial run, and verification change this to true
23+
dry-run: false
24+
token: ${{ secrets.SYNC_TOKEN }} # Used when updating the labels on the repository.

Chocolatey.Cake.Recipe/Content/build.cake

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Setup<BuildData>(context =>
4343
);
4444
});
4545

46-
Information("Building version {0} of " + BuildParameters.Title + " ({1}, {2}) using version {3} of Cake, , and version {4} of Chocolatey.Cake.Recipe. (IsTagged: {5})",
46+
Information("Building version {0} of " + BuildParameters.Title + " ({1}, {2}) using version {3} of Cake, and version {4} of Chocolatey.Cake.Recipe. (IsTagged: {5})",
4747
BuildParameters.Version.PackageVersion,
4848
BuildParameters.Configuration,
4949
BuildParameters.Target,

Chocolatey.Cake.Recipe/Content/dependencyCheck.cake

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ BuildParameters.Tasks.DependencyCheckTask = Task("Dependency-Check")
4646

4747
DeleteFile(BuildParameters.RootDirectoryPath.CombineWithFilePath("dependency-check.zip"));
4848

49+
if (ToolSettings.DependencyCheckDisableYarnAudit)
50+
{
51+
ReplaceTextInFiles(
52+
BuildParameters.RootDirectoryPath.Combine("tools/DependencyCheck.Runner.Tool.3.2.1/tools/bin").CombineWithFilePath("dependency-check.bat").ToString(),
53+
"org.owasp.dependencycheck.App %CMD_LINE_ARGS%",
54+
"org.owasp.dependencycheck.App --disableYarnAudit %CMD_LINE_ARGS%"
55+
);
56+
};
57+
4958
var DependencyCheckSettings = new DependencyCheckSettings {
5059
Project = BuildParameters.ProductName,
5160
Scan = BuildParameters.SourceDirectoryPath.FullPath,

Chocolatey.Cake.Recipe/Content/toolsettings.cake

+10-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public static class ToolSettings
2727
public static FilePath EazfuscatorToolLocation { get; private set; }
2828
public static string AmazonLambdaGlobalTool { get; private set; }
2929
public static string DependencyCheckTool { get; private set; }
30+
public static bool DependencyCheckDisableYarnAudit { get; private set; }
3031
public static string DotNetFormatGlobalTool { get; private set; }
3132
public static string GitVersionGlobalTool { get; private set; }
3233
public static string GitVersionTool { get; private set; }
@@ -109,7 +110,8 @@ public static class ToolSettings
109110
List<string> scriptAnalyzerExcludePaths = null,
110111
string testCoverageExcludeByAttribute = null,
111112
string testCoverageExcludeByFile = null,
112-
string testCoverageFilter = null
113+
string testCoverageFilter = null,
114+
bool dependencyCheckDisableYarnAudit = false
113115
)
114116
{
115117
context.Information("Setting up tools...");
@@ -125,6 +127,13 @@ public static class ToolSettings
125127
TestCoverageExcludeByFile = testCoverageExcludeByFile ?? "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs";
126128
TestCoverageFilter = testCoverageFilter ?? string.Format("+[{0}*]* +[{1}*]* -[*.tests]* -[*.Tests]*", BuildParameters.Title, BuildParameters.Title.ToLowerInvariant());
127129

130+
DependencyCheckDisableYarnAudit = dependencyCheckDisableYarnAudit;
131+
132+
if (context.HasArgument("dependencyCheckDisableYarnAudit"))
133+
{
134+
DependencyCheckDisableYarnAudit = context.Argument<bool>("dependencyCheckDisableYarnAudit");
135+
}
136+
128137
// We only use MSBuild when running on Windows. Elsewhere, we use XBuild when required. As a result,
129138
// we only need to detect the correct version of MSBuild when running on WIndows, and when it hasn't
130139
// been explicitly set.

0 commit comments

Comments
 (0)