tools/github_workflows/run-extractor.yaml [44:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        run: |
          Set-StrictMode -Version Latest
          $ErrorActionPreference = "Stop"
          $VerbosePreference = "Continue"
          $InformationPreference = "Continue"

          Write-Information "Setting name variables..."
          $releaseFileName = "extractor-linux-x64.zip"
          $executableFileName = "extractor"

          if ("${{ runner.os }}" -like "*win*") {
            $releaseFileName = "extractor-win-x64.zip"
            $executableFileName = "extractor.exe"
          }
          elseif ("${{ runner.os }}" -like "*mac*" -and "${{ runner.arch }}" -like "*arm*") {
            $releaseFileName = "extractor-osx-arm64.zip"
          }
          elseif ("${{ runner.os }}" -like "*mac*" -and "${{ runner.arch }}" -like "*x86_64*") {
            $releaseFileName = "extractor-osx-x64.zip"
          }

          Write-Information "Downloading release..."
          $uri = "https://github.com/Azure/apiops/releases/download/${{ env.apiops_release_version }}/$releaseFileName"
          $downloadFilePath = Join-Path "${{ runner.temp }}" $releaseFileName
          Invoke-WebRequest -Uri "$uri" -OutFile "$downloadFilePath"

          Write-Information "Extracting release..."
          $executableFolderPath = Join-Path "${{ runner.temp }}" "extractor"
          Expand-Archive -Path "$downloadFilePath" -DestinationPath "$executableFolderPath"
          $executableFilePath = Join-Path "$executableFolderPath" $executableFileName

          Write-Information "Setting file permissions..."
          if ("${{ runner.os }}" -like "*linux*")
          {
            & chmod +x "$executableFilePath"
            if ($LASTEXITCODE -ne 0) { throw "Setting file permissions failed."}
          }

          Write-Information "Running extractor..."
          & "$executableFilePath"              
          if ($LASTEXITCODE -ne 0) { throw "Running extractor failed."}

          Write-Information "Execution complete."
        shell: pwsh
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tools/github_workflows/run-extractor.yaml [101:144]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        run: |
          Set-StrictMode -Version Latest
          $ErrorActionPreference = "Stop"
          $VerbosePreference = "Continue"
          $InformationPreference = "Continue"

          Write-Information "Setting name variables..."
          $releaseFileName = "extractor-linux-x64.zip"
          $executableFileName = "extractor"

          if ("${{ runner.os }}" -like "*win*") {
            $releaseFileName = "extractor-win-x64.zip"
            $executableFileName = "extractor.exe"
          }
          elseif ("${{ runner.os }}" -like "*mac*" -and "${{ runner.arch }}" -like "*arm*") {
            $releaseFileName = "extractor-osx-arm64.zip"
          }
          elseif ("${{ runner.os }}" -like "*mac*" -and "${{ runner.arch }}" -like "*x86_64*") {
            $releaseFileName = "extractor-osx-x64.zip"
          }

          Write-Information "Downloading release..."
          $uri = "https://github.com/Azure/apiops/releases/download/${{ env.apiops_release_version }}/$releaseFileName"
          $downloadFilePath = Join-Path "${{ runner.temp }}" $releaseFileName
          Invoke-WebRequest -Uri "$uri" -OutFile "$downloadFilePath"

          Write-Information "Extracting release..."
          $executableFolderPath = Join-Path "${{ runner.temp }}" "extractor"
          Expand-Archive -Path "$downloadFilePath" -DestinationPath "$executableFolderPath"
          $executableFilePath = Join-Path "$executableFolderPath" $executableFileName

          Write-Information "Setting file permissions..."
          if ("${{ runner.os }}" -like "*linux*")
          {
            & chmod +x "$executableFilePath"
            if ($LASTEXITCODE -ne 0) { throw "Setting file permissions failed."}
          }

          Write-Information "Running extractor..."
          & "$executableFilePath"              
          if ($LASTEXITCODE -ne 0) { throw "Running extractor failed."}

          Write-Information "Execution complete."
        shell: pwsh
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



