Skip to content

Commit 2b3d14f

Browse files
committed
Added default branch name
1 parent 6771dfc commit 2b3d14f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: build/Build/Lifetime.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ public override void Setup(Context context, ISetupContext info)
2828
catch (Exception ex)
2929
{
3030
context.Error(ex);
31+
3132
// running dev pipeline by default if we can't determine otherwise
32-
context.General.CurrentBranch = new BranchService().GetBranch("develop");
33+
context.General.CurrentBranchName = "develop";
34+
context.General.CurrentBranch = new BranchService().GetBranch(context.General.CurrentBranchName);
3335
}
3436

3537
context.Information(string.Join(Environment.NewLine, context.Environment.GetEnvironmentVariables()));

Diff for: build/Build/Tasks/GenerateVersion.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ public override void Run(Context context)
2121

2222
var buildPropertiesPath = context.Environment.WorkingDirectory.FullPath + "/Directory.Build.Props";
2323
string assemblyVersion = "0.0.0";
24-
//TODO: Read version from msbuild to include Directory.Build.Props settings correctly
2524
assemblyVersion = context.XmlPeek(buildPropertiesPath, "//AssemblyVersion");
26-
context.Information($"Found {assemblyVersion} as assembly version in csproj file.");
25+
context.Information($"Found {assemblyVersion} as assembly version in Build properties file.");
2726
_context = context;
2827
IArtifactVersionService versionService = new ArtifactVersionService(new BranchService());
2928
context.General.ArtifactVersion = versionService.GetArtifactVersion(

0 commit comments

Comments
 (0)