Skip to content

Commit

Permalink
Merge branch 'hotfix/0.4.2' into develop
Browse files Browse the repository at this point in the history
* hotfix/0.4.2:
  (#30) Don't duplicate pushing of packages
  • Loading branch information
gep13 committed Mar 17, 2022
2 parents 3919b30 + 4e95876 commit 97c99dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Chocolatey.Cake.Recipe/Content/packages.cake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BuildParameters.Tasks.CopyNuspecFolderTask = Task("Copy-Nuspec-Folders")
BuildParameters.Tasks.CreateChocolateyPackagesTask = Task("Create-Chocolatey-Packages")
.IsDependentOn("Clean")
.IsDependentOn("Copy-Nuspec-Folders")
.WithCriteria(() => BuildParameters.ShouldRunChocolatey, "Skipping because execution of Chocolatey has been disabled")
.WithCriteria(() => BuildParameters.BuildAgentOperatingSystem == PlatformFamily.Windows, "Skipping because not running on Windows")
.WithCriteria(() => DirectoryExists(BuildParameters.Paths.Directories.ChocolateyNuspecDirectory), "Skipping because Chocolatey nuspec directory is missing")
.Does(() =>
Expand All @@ -43,6 +44,7 @@ BuildParameters.Tasks.CreateChocolateyPackagesTask = Task("Create-Chocolatey-Pac
BuildParameters.Tasks.CreateNuGetPackagesTask = Task("Create-NuGet-Packages")
.IsDependentOn("Clean")
.IsDependentOn("Copy-Nuspec-Folders")
.WithCriteria(() => BuildParameters.ShouldRunNuGet, "Skipping because execution of NuGet has been disabled")
.WithCriteria(() => DirectoryExists(BuildParameters.Paths.Directories.NuGetNuspecDirectory), "NuGet nuspec directory does not exist")
.Does(() =>
{
Expand Down Expand Up @@ -140,6 +142,8 @@ BuildParameters.Tasks.DotNetCorePackTask = Task("DotNetCorePack")

BuildParameters.Tasks.PublishPreReleasePackagesTask = Task("Publish-PreRelease-Packages")
.WithCriteria(() => !BuildParameters.IsLocalBuild || BuildParameters.ForceContinuousIntegration, "Skipping because this is a local build, and force isn't being applied")
.WithCriteria(() => !BuildParameters.IsPullRequest, "Skipping because current build is from a Pull Request")
.WithCriteria(() => !BuildParameters.IsTagged, "Skipping because current commit is tagged")
.IsDependentOn("Package")
.Does(() =>
{
Expand All @@ -159,6 +163,7 @@ BuildParameters.Tasks.PublishPreReleasePackagesTask = Task("Publish-PreRelease-P

BuildParameters.Tasks.PublishReleasePackagesTask = Task("Publish-Release-Packages")
.WithCriteria(() => !BuildParameters.IsLocalBuild || BuildParameters.ForceContinuousIntegration, "Skipping because this is a local build, and force isn't being applied")
.WithCriteria(() => !BuildParameters.IsPullRequest, "Skipping because current build is from a Pull Request")
.WithCriteria(() => BuildParameters.IsTagged, "Skipping because current commit is not tagged")
.IsDependentOn("Package")
.Does(() =>
Expand Down
6 changes: 6 additions & 0 deletions Chocolatey.Cake.Recipe/Content/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public static class BuildParameters
public static bool ObfuscateAssembly { get; private set; }
public static bool ShouldRunInspectCode { get; private set; }
public static bool ShouldRunDotNetCorePack { get; private set; }
public static bool ShouldRunChocolatey { get; private set; }
public static bool ShouldRunNuGet { get; private set; }
public static bool ShouldBuildNugetSourcePackage { get; private set; }

public static bool ShouldStrongNameOutputAssemblies { get; private set; }
Expand Down Expand Up @@ -231,6 +233,8 @@ public static class BuildParameters
string repositoryName = null,
bool shouldRunInspectCode = true,
bool shouldRunDotNetCorePack = false,
bool shouldRunChocolatey = true,
bool shouldRunNuGet = true,
bool shouldBuildNugetSourcePackage = false,
bool shouldStrongNameOutputAssemblies = true,
bool shouldObfuscateOutputAssemblies = true,
Expand Down Expand Up @@ -315,6 +319,8 @@ public static class BuildParameters

ShouldRunInspectCode = shouldRunInspectCode;
ShouldRunDotNetCorePack = shouldRunDotNetCorePack;
ShouldRunChocolatey = shouldRunChocolatey;
ShouldRunNuGet = shouldRunNuGet;
ShouldBuildNugetSourcePackage = shouldBuildNugetSourcePackage;

ShouldStrongNameOutputAssemblies = shouldStrongNameOutputAssemblies;
Expand Down

0 comments on commit 97c99dd

Please sign in to comment.