diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-07-13 12:14:51 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-13 12:14:51 -0700 |
| commit | bc07f4b0523b035dcc4fc37eea0d6f5adeb8d30b (patch) | |
| tree | 1898436300a7bff83d535b401f5229e60f11087c | |
| parent | 713950c89b02394967902c2d9ed901ccf41a3466 (diff) | |
| download | vcpkg-bc07f4b0523b035dcc4fc37eea0d6f5adeb8d30b.tar.gz vcpkg-bc07f4b0523b035dcc4fc37eea0d6f5adeb8d30b.zip | |
[vcpkg-ci] Always publish file lists (#12384)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
| -rw-r--r-- | scripts/azure-pipelines/linux/azure-pipelines.yml | 4 | ||||
| -rw-r--r-- | scripts/azure-pipelines/osx/azure-pipelines.yml | 4 | ||||
| -rw-r--r-- | scripts/azure-pipelines/windows/azure-pipelines.yml | 4 | ||||
| -rw-r--r-- | scripts/file_script.py | 13 |
4 files changed, 14 insertions, 11 deletions
diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index e32f98331..4d4eada62 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 580eeac50..f90cc5c30 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 4136615c7..5ec0b300c 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 1170c643f..de57f2720 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])
|
