Skip to content

Commit

Permalink
Better identification of Bitbucket Pipelines environment
Browse files Browse the repository at this point in the history
  • Loading branch information
LoremFooBar committed Jul 28, 2022
1 parent 09c9b00 commit 1d25d20
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ namespace Nerdbank.GitVersioning.CloudBuildServices;
public class BitbucketCloud : ICloudBuild
{
/// <inheritdoc />
public bool IsApplicable => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_REPO_SLUG"));
public bool IsApplicable => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_PIPELINE_UUID")) &&
!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_STEP_UUID")) &&
!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_STEP_TRIGGERER_UUID"));

/// <inheritdoc />
public bool IsPullRequest => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("BITBUCKET_PR_ID"));
Expand Down

0 comments on commit 1d25d20

Please sign in to comment.