Skip to content

Commit

Permalink
ci: Swap branch conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnatamo committed Jul 27, 2024
1 parent 5f3967b commit c7cf288
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .build/Build.Docker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ partial class Build : NukeBuild
{
private string DockerImage => $"ghcr.io/fetcharr/fetcharr";

private string[] DockerVersionTags => GitVersion.BranchName.Equals("develop", StringComparison.InvariantCultureIgnoreCase)
? ["develop", $"develop-{GitVersion.MajorMinorPatch}.{GitVersion.PreReleaseNumber}"]
: ["latest", $"{GitVersion.Major}", $"{GitVersion.Major}.{GitVersion.Minor}", $"{GitVersion.MajorMinorPatch}"];
private string[] DockerVersionTags => GitVersion.BranchName.Equals("main", StringComparison.InvariantCultureIgnoreCase)
? ["latest", $"{GitVersion.Major}", $"{GitVersion.Major}.{GitVersion.Minor}", $"{GitVersion.MajorMinorPatch}"]
: ["develop", $"develop-{GitVersion.MajorMinorPatch}.{GitVersion.PreReleaseNumber}"];

private string[] DockerImageTags => DockerVersionTags.Select(version => $"{DockerImage}:{version}").ToArray();

Expand Down

0 comments on commit c7cf288

Please sign in to comment.