diff --git a/build/azure-pipelines.yml b/build/azure-pipelines-test.yml similarity index 58% rename from build/azure-pipelines.yml rename to build/azure-pipelines-test.yml index 840cde8a2..4b0915d42 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines-test.yml @@ -35,26 +35,40 @@ stages: - checkout: self fetchDepth: 0 - script: | + echo "##vso[task.setvariable variable=SOURCE_BRANCH]$(Build.SourceBranch)" + echo "##vso[task.setvariable variable=TARGET_BRANCH]$(System.PullRequest.TargetBranch)" + echo "build source name: $(Build.Repository.Name)" + echo "build source ref: $(Build.SourceBranch)" + echo "build source version: $(Build.SourceVersion)" + echo "PR source branch: $(System.PullRequest.SourceBranch)" + echo "PR target branch: $(System.PullRequest.TargetBranch)" + - powershell: | echo "##[group]Checking for changes outside docs folder" # Check if we are in a PR build or normal branch build - if [ "$(System.PullRequest.SourceBranch)" != "" ]; then - # PR build: compare source branch with target branch (e.g., main) - git fetch origin $(System.PullRequest.TargetBranch) - CHANGED_FILES=$(git diff --name-only origin/$(System.PullRequest.TargetBranch) $(System.PullRequest.SourceBranch)) - else - # Branch build: compare current commit with previous commit - git fetch origin $(Build.SourceBranch) --depth=2 - CHANGED_FILES=$(git diff --name-only HEAD^1 HEAD) - fi + if ($env:System_PullRequest_SourceBranch -ne "") { + # PR build: compare source branch with target branch (e.g., main) + $CHANGED_FILES = git diff --name-only origin/$env:TARGET_BRANCH + echo "Checking changes between $env:TARGET_BRANCH and $env:SOURCE_BRANCH results in the following files: $CHANGED_FILES" + } else { + # Branch build: compare current commit with previous commit + git fetch origin $env:Build_SourceBranch --depth=2 + $CHANGED_FILES = git diff --name-only HEAD~1 HEAD + } + + $skipBuildStage = $true - # Check if any files outside the /docs/ folder changed - if echo "$CHANGED_FILES" | grep -v '^docs/'; then - echo "##[endgroup]" - echo "##vso[task.setvariable variable=skipBuildStage]false" - else - echo "##[endgroup]" - echo "##vso[task.setvariable variable=skipBuildStage]true" - fi + foreach ($file in $CHANGED_FILES) { + if ($file -notmatch '^docs/') { + $skipBuildStage = $false + break + } + } + + if ($skipBuildStage) { + echo "##vso[task.setvariable variable=skipBuildStage]true" + } else { + echo "##vso[task.setvariable variable=skipBuildStage]false" + } displayName: 'Check if non-docs files were changed' - powershell: | if ($(skipBuildStage) -eq 'true') { diff --git a/docs/getting-started.md b/docs/getting-started.md index 278b7b7ec..0b9b71557 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,6 +1,7 @@ # Getting started with the Firely SDK CQL repository another test edit test edit. +PR this time The repository consists of two parts: * `Cql/` - the main body of code that produces the CQL engine itself, plus the PackagerCLI