Skip to content

Commit

Permalink
Update GitCommitsInRange.cs
Browse files Browse the repository at this point in the history
build-tools/scripts/XAVersionInfo.targets(43,5): error MSB4044: The "GitCommitsInRange" task was not given a value for the required parameter "StartCommit". [build-tools/create-packs/Microsoft.Android.Sdk.proj]
  • Loading branch information
jonathanpeppers committed Jul 16, 2024
1 parent 2ce3d9c commit 705b106
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class GitCommitsInRange : Git
[Output]
public int CommitCount { get; set; }

[Required]
public string StartCommit { get; set; }

public string EndCommit { get; set; }
Expand All @@ -30,7 +29,12 @@ public override bool Execute ()
Log.LogMessage (MessageImportance.Low, $" {nameof (EndCommit)}: {EndCommit}");
Log.LogMessage (MessageImportance.Low, $" {nameof (WorkingDirectory)}: {WorkingDirectory.ItemSpec}");

base.Execute ();
// Only run if non-empty
if (!string.IsNullOrEmpty (StartCommit)) {
base.Execute ();
} else {
CommitCount = 0;
}

Log.LogMessage (MessageImportance.Low, $" [Output] {nameof (CommitCount)}: {CommitCount}");

Expand Down

0 comments on commit 705b106

Please # to comment.