diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index e32f9833172..4d4eada627c 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -51,11 +51,11 @@ jobs: - bash: | python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/ displayName: 'Build a file list for all packages' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() - task: PublishBuildArtifacts@1 displayName: 'Upload file lists for all packages' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() inputs: PathtoPublish: scripts/list_files diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 580eeac50f5..f90cc5c3052 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -55,11 +55,11 @@ jobs: - bash: | python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/ displayName: 'Build a file list for all packages' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() - task: PublishBuildArtifacts@1 displayName: 'Upload file lists for all packages' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() inputs: PathtoPublish: scripts/list_files diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index 4136615c725..5ec0b300c29 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -63,7 +63,7 @@ jobs: condition: failed() - task: PowerShell@2 displayName: "Generating all packages files" - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() inputs: targetType: inline @@ -73,7 +73,7 @@ jobs: & $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\ - task: PublishBuildArtifacts@1 displayName: 'Upload file lists for all packages' - condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + condition: always() inputs: PathtoPublish: scripts/list_files ArtifactName: "${{ parameters.triplet }} package file lists" diff --git a/scripts/file_script.py b/scripts/file_script.py index 1170c643f4c..de57f272099 100644 --- a/scripts/file_script.py +++ b/scripts/file_script.py @@ -28,11 +28,14 @@ def main(path): except FileExistsError: print("Path already exists, continuing...") - headers = open("scripts/list_files/VCPKGHeadersDatabase.txt", mode='w') - output = open("scripts/list_files/VCPKGDatabase.txt", mode='w') - gen_all_file_strings(path, getFiles(path), headers, output) - headers.close() - output.close() + try: + headers = open("scripts/list_files/VCPKGHeadersDatabase.txt", mode='w') + output = open("scripts/list_files/VCPKGDatabase.txt", mode='w') + gen_all_file_strings(path, getFiles(path), headers, output) + headers.close() + output.close() + except e: + print("Failed to generate file lists") if __name__ == "__main__": main(sys.argv[1])