Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review remarks integrated
  • Loading branch information
HHobeck committed Apr 6, 2023
commit 97f201908c5a4268762a633e8efcf606a6e299ee
2 changes: 1 addition & 1 deletion BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* The process of increasing the version with bump message when `CommitMessageIncrementing` is enabled and increment strategy is `None` has been changed.
* A new configuration property with name `version-in-branch-pattern` has been introduced. This setting only applies on branches where the option `is-release-branch` is set to `true`. Please notice that the branch name needs to be defined after the version number by default (instead of `support/lts-2.0.0` please name the branch like `support/2.0.0-lts`).
* The `is-release-branch` property of the `hotfix` branch setting has been changed from `false` to `true`. If present the hotfix number will be considered now by default.
* In the git hub and the git flow workflow the `label` property is by default set to an empty string on the `main` branch. This yields to a pre-release version on `main` with an empty tag. Instead of for instance `1.0.1+46` git-version generates the full semantic version `1.0.1-46` instead. This behavior can be changed to generate only main versions (no pre-release version) with setting the label to `null` (Please keep in mind that the `label` property on root needs to be set to `null` as well otherwise the fallback applies). This change is caused by issue #2347.
* In the GitHub and the Git Flow workflows the `label` property is by default set to an empty string on the `main` branch. This yields to a pre-release version on `main` with an empty tag. Instead of for instance `1.0.1+46` GitVersion generates the full semantic version `1.0.1-46` instead. This behavior can be changed to generate only stable versions (no pre-release version) with setting the label to `null` (Please keep in mind that the `label` property on root needs to be set to `null` as well, otherwise the fallback applies). This change is caused by issue #2347.

## v5.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ public ContinuousDeliveryVersionCalculator(ILog log, IRepositoryStore repository

public SemanticVersion Calculate(NextVersion nextVersion)
{
using (this.log.IndentLog("Using continues delivery typology to calculate the incremented version!!"))
using (this.log.IndentLog("Using continuous delivery workflow to calculate the incremented version."))
{
var preReleaseTag = nextVersion.IncrementedVersion.PreReleaseTag;
if (!preReleaseTag.HasTag() || !preReleaseTag.Number.HasValue)
throw new WarningException("--PRE--CONDITION--FAILED--");
{
throw new WarningException("Continues delivery deployment requires a pre-release tag.");
}

return CalculateInternal(nextVersion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ public ContinuousDeploymentVersionCalculator(ILog log, IRepositoryStore reposito

public SemanticVersion Calculate(NextVersion nextVersion)
{
using (this.log.IndentLog("Using continues deployment typology to calculate the incremented version!!"))
using (this.log.IndentLog("Using continuous deployment workflow to calculate the incremented version."))
{
if (!nextVersion.Configuration.IsMainline || nextVersion.Configuration.Label is not null)
throw new WarningException("--PRE--CONDITION--FAILED--");
if (nextVersion.Configuration.Label is not null)
{
throw new WarningException("Continues deployment requires no pre-release tag.");
}
if (!nextVersion.Configuration.IsMainline)
{
throw new WarningException("Continues deployment only supported for mainline branches.");
}

return CalculateInternal(nextVersion);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ public ManualDeploymentVersionCalculator(ILog log, IRepositoryStore repositorySt

public SemanticVersion Calculate(NextVersion nextVersion)
{
using (this.log.IndentLog("Using manual deployment typology to calculate the incremented version!!"))
using (this.log.IndentLog("Using manual deployment workflow to calculate the incremented version."))
{
var preReleaseTag = nextVersion.IncrementedVersion.PreReleaseTag;
if (!preReleaseTag.HasTag() || !preReleaseTag.Number.HasValue)
throw new WarningException("--PRE--CONDITION--FAILED--");
{
throw new WarningException("Manual deployment requires a pre-release tag.");
}

return CalculateInternal(nextVersion);
}
Expand Down