diff --git a/Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj b/Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj index 220ca475..25a08ca4 100644 --- a/Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj +++ b/Source/GitReleaseManager.Cli/GitReleaseManager.Cli.csproj @@ -17,7 +17,7 @@ - + \ No newline at end of file diff --git a/Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj b/Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj index 8c7ea15f..06ba2bb6 100644 --- a/Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj +++ b/Source/GitReleaseManager.Cli/GitReleaseManager.Tool.csproj @@ -32,7 +32,7 @@ - + diff --git a/Source/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj b/Source/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj index 91d58ced..8b066ec1 100644 --- a/Source/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj +++ b/Source/GitReleaseManager.IntegrationTests/GitReleaseManager.IntegrationTests.csproj @@ -15,9 +15,9 @@ - - + + - + \ No newline at end of file diff --git a/Source/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj b/Source/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj index a743e971..93c85167 100644 --- a/Source/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj +++ b/Source/GitReleaseManager.Tests/GitReleaseManager.Tests.csproj @@ -14,10 +14,10 @@ - - + + - - + + \ No newline at end of file diff --git a/Source/GitReleaseManager/Configuration/Config.cs b/Source/GitReleaseManager/Configuration/Config.cs index 9ec7c941..b9f53fc1 100644 --- a/Source/GitReleaseManager/Configuration/Config.cs +++ b/Source/GitReleaseManager/Configuration/Config.cs @@ -32,6 +32,7 @@ public Config() IncludeShaSection = false, ShaSectionHeading = "SHA256 Hashes of the release artifacts", ShaSectionLineFormat = "- `{1}\t{0}`", + AllowUpdateToPublishedRelease = false, }; Export = new ExportConfig diff --git a/Source/GitReleaseManager/Configuration/CreateConfig.cs b/Source/GitReleaseManager/Configuration/CreateConfig.cs index 00f0449b..6f9cd314 100644 --- a/Source/GitReleaseManager/Configuration/CreateConfig.cs +++ b/Source/GitReleaseManager/Configuration/CreateConfig.cs @@ -38,5 +38,8 @@ public class CreateConfig [YamlMember(Alias = "sha-section-line-format")] public string ShaSectionLineFormat { get; set; } + + [YamlMember(Alias = "allow-update-to-published")] + public bool AllowUpdateToPublishedRelease { get; set; } } } \ No newline at end of file diff --git a/Source/GitReleaseManager/GitHubProvider.cs b/Source/GitReleaseManager/GitHubProvider.cs index 1a12d040..ed93ebeb 100644 --- a/Source/GitReleaseManager/GitHubProvider.cs +++ b/Source/GitReleaseManager/GitHubProvider.cs @@ -153,7 +153,7 @@ public async Task CreateReleaseFromMilestone(string owner, string repos { _logger.Warning("A release for milestone {Milestone} already exists, and will be updated", milestone); - if (!release.Draft) + if (!release.Draft && !_configuration.Create.AllowUpdateToPublishedRelease) { throw new InvalidOperationException("Release is not in draft state, so not updating."); } diff --git a/Source/GitReleaseManager/GitReleaseManager.Core.csproj b/Source/GitReleaseManager/GitReleaseManager.Core.csproj index 27a70a2a..91b3dad0 100644 --- a/Source/GitReleaseManager/GitReleaseManager.Core.csproj +++ b/Source/GitReleaseManager/GitReleaseManager.Core.csproj @@ -11,9 +11,9 @@ - + - + \ No newline at end of file diff --git a/docs/input/docs/configuration/default-configuration.md b/docs/input/docs/configuration/default-configuration.md index 4239f94c..53ba4c38 100644 --- a/docs/input/docs/configuration/default-configuration.md +++ b/docs/input/docs/configuration/default-configuration.md @@ -20,6 +20,7 @@ create: include-sha-section: false sha-section-heading: "SHA256 Hashes of the release artifacts" sha-section-line-format: "- `{1}\t{0}`" + allow-update-to-published: false export: include-created-date-in-title: false created-date-string-format: '' @@ -103,6 +104,10 @@ control the look and feel of the generated release notes. used when creating the SHA256 hash entries in the release notes. Default is ``- `{1}\t{0}` `` **NOTE:** This configuration option was added in version 0.9.0 of GitReleaseManager. +- **allow-update-to-published** + - A boolean value which indicates whether or not updates can be applied to + published releases. The default value is false. **NOTE:** This + configuration option was added in version 0.11.0 of GitReleaseManager. See the [example create configuration section](create-configuration) to see an example of how a footer can be configured.