Add publishing of vcpkg-readonly-bundle and vcpkg-ce.
MODIFY
.gitignore
.gitignore
# Qt Creator CMake project files
CMakeLists.txt.user
.cache
+/vcpkg-ce.zip
+/vcpkg-ce/**

MODIFY
CMakeLists.txt
CMakeLists.txt
@@ -92,7 +92,9 @@ if(NOT DEFINED VCPKG_VERSION OR VCPKG_VERSION STREQUAL "")
set(VCPKG_VERSION "unknownhash")
endif()
-set(VCPKG_BASE_VERSION "2021-11-24")
+if(NOT DEFINED VCPKG_BASE_VERSION)
+ set(VCPKG_BASE_VERSION "9999-99-99")
+endif()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

MODIFY
azure-pipelines/end-to-end-tests.ps1
azure-pipelines/end-to-end-tests.ps1
@@ -25,7 +25,7 @@ Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]$WorkingRoot,
- [Parameter(Mandatory = $true)]
+ [Parameter(Mandatory = $false)]
[string]$VcpkgRoot,
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
@@ -41,6 +41,15 @@ if (-Not (Test-Path $WorkingRoot)) {
}
$WorkingRoot = (Get-Item $WorkingRoot).FullName
+if ([string]::IsNullOrWhitespace($VcpkgRoot)) {
+ $VcpkgRoot = $env:VCPKG_ROOT
+}
+
+if ([string]::IsNullOrWhitespace($VcpkgRoot)) {
+ Write-Error "Could not determine VCPKG_ROOT"
+ throw
+}
+
$VcpkgRoot = (Get-Item $VcpkgRoot).FullName
if ([string]::IsNullOrEmpty($VcpkgExe))

ADD
azure-pipelines/mint-readonly-bundle.ps1
+[CmdletBinding()]
+Param(
+ [Parameter(Mandatory = $True)]
+ [string]$DestinationTarballName,
+ [Parameter(Mandatory = $True)]
+ [string]$BundleConfig,
+ [Parameter()]
+ [string]$TempPath
+)
+
+if (-not (Test-Path $BundleConfig)) {
+ Write-Error 'BundleConfig must be an existing file.'
+ throw
+}
+
+$BundleConfig = (Get-Item $BundleConfig).FullName
+
+$sha = Get-Content "$PSScriptRoot/vcpkg-scripts-sha.txt" -Raw
+$sha = $sha.Trim()
+
+$scripts_dependencies = @(
+ 'buildsystems',
+ 'cmake',
+ 'detect_compiler',
+ 'get_cmake_vars',
+ 'posh-vcpkg',
+ 'templates',
+ 'toolchains',
+ 'addPoshVcpkgToPowershellProfile.ps1',
+ 'ports.cmake',
+ 'vcpkg_completion.bash',
+ 'vcpkg_completion.fish',
+ 'vcpkg_completion.zsh',
+ 'vcpkg_get_dep_info.cmake',
+ 'vcpkg_get_tags.cmake',
+ 'vcpkgTools.xml'
+)
+
+if (Test-Path $TempPath) {
+ rm -Recurse $TempPath
+}
+
+mkdir $TempPath
+pushd $TempPath
+try {
+ $target = "https://github.com/microsoft/vcpkg/archive/$sha.zip"
+ Write-Host $target
+ curl.exe -L -o repo.zip $target
+ tar xf repo.zip
+ mkdir out
+ mkdir 'out/scripts'
+ pushd "vcpkg-$sha"
+ try {
+ mv 'triplets' '../out/triplets'
+ foreach ($dep in $scripts_dependencies) {
+ mv "scripts/$dep" "../out/scripts/$dep"
+ }
+ }
+ finally {
+ popd
+ }
+
+ cp $BundleConfig 'out/.vcpkg-root'
+ tar czf $DestinationTarballName -C out *
+}
+finally {
+ popd
+}
+
+rm -Recurse $TempPath

MODIFY
azure-pipelines/pipelines.yml
azure-pipelines/pipelines.yml
-variables:
- VCPKG_REPO_COMMIT_SHA: '261c458af6e3eed5d099144aff95d2b5035f656b'
jobs:
- job: linux_gcc_9
displayName: 'Ubuntu 20.04 with GCC 9'
@@ -11,7 +9,7 @@ jobs:
steps:
- bash: |
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT" -n
- git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
+ git -C "$VCPKG_ROOT" checkout `cat azure-pipelines/vcpkg-scripts-sha.txt`
displayName: "Clone vcpkg repo to serve as root"
- bash: |
export CXXFLAGS="-fprofile-arcs -ftest-coverage -fPIC -O0"
@@ -59,7 +57,7 @@ jobs:
steps:
- bash: |
git clone https://github.com/microsoft/vcpkg "$VCPKG_ROOT" -n
- git -C "$VCPKG_ROOT" checkout $VCPKG_REPO_COMMIT_SHA
+ git -C "$VCPKG_ROOT" checkout `cat azure-pipelines/vcpkg-scripts-sha.txt`
displayName: "Clone vcpkg repo to serve as root"
- bash: |
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -B build.amd64.debug
@@ -102,10 +100,15 @@ jobs:
inputs:
PathtoPublish: '$(DiffFile)'
ArtifactName: 'format.diff'
- - script: |
- git clone https://github.com/microsoft/vcpkg "%VCPKG_ROOT%" -n
- git -C "%VCPKG_ROOT%" checkout %VCPKG_REPO_COMMIT_SHA%
+ - task: Powershell@2
displayName: "Clone vcpkg repo to serve as root"
+ inputs:
+ pwsh: true
+ targetType: inline
+ script: |
+ $sha = (Get-Content azure-pipelines/vcpkg-scripts-sha.txt -Raw).Trim()
+ git clone https://github.com/microsoft/vcpkg $env:VCPKG_ROOT -n
+ git -C "$env:VCPKG_ROOT" checkout $sha
- task: CmdLine@2
displayName: "Build vcpkg with CMake, and Run Tests"
inputs:
@@ -120,6 +123,6 @@ jobs:
displayName: 'Run vcpkg end-to-end tests'
inputs:
filePath: 'azure-pipelines/end-to-end-tests.ps1'
- arguments: '-Triplet x86-windows -WorkingRoot work -VcpkgRoot "$(VCPKG_ROOT)"'
+ arguments: '-Triplet x86-windows -WorkingRoot work'
workingDirectory: '$(Build.SourcesDirectory)/build.x86.debug'
pwsh: true

ADD
azure-pipelines/readonly-bundleconfig.json
+{
+ "readonly": true
+}

MODIFY
azure-pipelines/signing.signproj
azure-pipelines/signing.signproj
<FilesToSign Include="$(IntermediateOutputPath)\vcpkg-muslc">
<Authenticode>LinuxSign</Authenticode>
</FilesToSign>
+
+ <FilesToSign Include="$(IntermediateOutputPath)\vcpkg-ce\**\*.js" Exclude="$(IntermediateOutputPath)\vcpkg-ce\**\node_modules\**\*.js">
+ <Authenticode>Microsoft400</Authenticode>
+ </FilesToSign>
+ <FilesToSign Include="$(IntermediateOutputPath)\vcpkg-ce\**\ce.ps1">
+ <Authenticode>Microsoft400</Authenticode>
+ </FilesToSign>
+ <FilesToSign Include="$(IntermediateOutputPath)\vcpkg-ce\**\node_modules\**\*.js">
+ <Authenticode>3PartyScriptsSHA2</Authenticode>
+ </FilesToSign>
</ItemGroup>
<ImportGroup Label="ExtensionTargets">

MODIFY
azure-pipelines/signing.yml
azure-pipelines/signing.yml
@@ -15,6 +15,7 @@ parameters:
- real
variables:
+ VCPKG_BASE_VERSION: $[format('{0:yyyy}-{0:MM}-{0:dd}', pipeline.startTime)]
TeamName: vcpkg
# If the user didn't override the signing type, then only real-sign on main.
${{ if ne(parameters.SignTypeOverride, 'default') }}:
@@ -90,7 +91,7 @@ jobs:
inputs:
failOnStderr: true
script: |
- scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -B "$(Build.BinariesDirectory)/build"'
+ scl enable devtoolset-9 'cmake3 -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_EMBED_GIT_SHA=ON -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)/$FMT_TARBALL_DIRNAME" -DVCPKG_BASE_VERSION=$(VCPKG_BASE_VERSION) -B "$(Build.BinariesDirectory)/build"'
make -j 4 -C "$(Build.BinariesDirectory)/build"
mv "$(Build.BinariesDirectory)/build/vcpkg" "$(Build.ArtifactStagingDirectory)/vcpkg-glibc"
- task: PublishBuildArtifacts@1
@@ -154,18 +155,18 @@ jobs:
- name: FMT_TARBALL_DIRNAME
value: "$(fmt-tarball-dirname)"
steps:
- - task: DownloadBuildArtifacts@0
- displayName: 'Download Unsigned POSIX Binaries'
- inputs:
- artifactName: staging
- - task: CmdLine@2
- displayName: 'Move Linux Binaries to BinariesDirectory'
+ # Download all dependencies and sources
+ - task: PowerShell@2
+ displayName: 'Download vcpkg-ce sources'
inputs:
- failOnStderr: true
+ targetType: 'inline'
script: |
- mkdir "$(Build.BinariesDirectory)\build"
- copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-glibc" "$(Build.BinariesDirectory)\vcpkg-glibc"
- copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.BinariesDirectory)\vcpkg-muslc"
+ $sha = Get-Content azure-pipelines/vcpkg-ce-sha.txt -Raw
+ $sha = $sha.Trim()
+ curl.exe -L -o vcpkg-ce.zip "https://github.com/microsoft/vcpkg-ce/archive/$sha.zip"
+ tar xf vcpkg-ce.zip
+ mv "vcpkg-ce-$sha" vcpkg-ce
+ pwsh: true
- task: PowerShell@2
displayName: "Download fmt library"
inputs:
@@ -182,12 +183,36 @@ jobs:
found : $hash"
}
tar.exe -xf ./fmtlib.tar.gz
+ - task: Powershell@2
+ displayName: 'Build vcpkg-readonly-bundle.tar.gz'
+ inputs:
+ pwsh: true
+ filePath: azure-pipelines/mint-readonly-bundle.ps1
+ arguments: '-DestinationTarballName "$(Build.BinariesDirectory)\vcpkg-readonly-bundle.tar.gz" -BundleConfig azure-pipelines/readonly-bundleconfig.json -TempPath readonly-temp'
+ # Policy enforcement
- task: PoliCheck@1
inputs:
inputType: 'Basic'
targetType: 'F'
targetArgument: '$(Build.SourcesDirectory)'
result: 'PoliCheck.xml'
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
+ displayName: Run CredScan
+ inputs:
+ toolMajorVersion: V2
+ # Build vcpkg binaries
+ - task: DownloadBuildArtifacts@0
+ displayName: 'Download Unsigned POSIX Binaries'
+ inputs:
+ artifactName: staging
+ - task: CmdLine@2
+ displayName: 'Move Linux Binaries to BinariesDirectory'
+ inputs:
+ failOnStderr: true
+ script: |
+ mkdir "$(Build.BinariesDirectory)\build"
+ copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-glibc" "$(Build.BinariesDirectory)\vcpkg-glibc"
+ copy /Y "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.BinariesDirectory)\vcpkg-muslc"
- task: CmdLine@2
displayName: "Build vcpkg x86 with CMake"
inputs:
@@ -195,7 +220,7 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86
cmake.exe --version
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -B "$(Build.BinariesDirectory)\x86"
+ cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -B "$(Build.BinariesDirectory)\x86"
ninja.exe -C "$(Build.BinariesDirectory)\x86"
- task: CmdLine@2
displayName: "Build vcpkg arm64 with CMake"
@@ -204,11 +229,45 @@ jobs:
script: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=x86
cmake.exe --version
- cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_PDB_SUFFIX="-arm64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -B "$(Build.BinariesDirectory)\arm64"
+ cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -DVCPKG_BUILD_TLS12_DOWNLOADER=ON -DVCPKG_EMBED_GIT_SHA=ON -DVCPKG_PDB_SUFFIX="-arm64" -DFETCHCONTENT_FULLY_DISCONNECTED=ON "-DFETCHCONTENT_SOURCE_DIR_FMT=$(Build.BinariesDirectory)\%FMT_TARBALL_DIRNAME%" -DVCPKG_BASE_VERSION=%VCPKG_BASE_VERSION% -B "$(Build.BinariesDirectory)\arm64"
ninja.exe -C "$(Build.BinariesDirectory)\arm64"
- - task: MicroBuildSigningPlugin@2
+ # Build and test vcpkg-ce
+ - task: UseNode@1
+ displayName: Use Node 16 or later
inputs:
- signType: '$(SignType)'
+ version: "16.x"
+ - script: npm install -g @microsoft/rush
+ displayName: Install Rush
+ workingDirectory: vcpkg-ce
+ - script: rush update
+ displayName: Install vcpkg-ce Dependencies
+ workingDirectory: vcpkg-ce
+ - script: rush lint
+ displayName: Check vcpkg-ce for Linting Errors
+ workingDirectory: vcpkg-ce
+ - script: rush rebuild
+ displayName: Build vcpkg-ce Packages
+ workingDirectory: vcpkg-ce
+ - script: rush test
+ displayName: Run vcpkg-ce Tests
+ workingDirectory: vcpkg-ce
+ - script: |
+ rush set-versions
+ node -e "const c = require('./ce/package.json'); p = require('./assets/package.json') ; p.version = c.version; require('fs').writeFileSync('./assets/package.json', JSON.stringify(p,undefined,2)); console.log(``set asset version to `${p.version}``);"
+ displayName: Set vcpkg-ce Package Versions
+ workingDirectory: vcpkg-ce
+ - script: mkdir "$(Build.BinariesDirectory)\vcpkg-ce" && rush deploy -t "$(Build.BinariesDirectory)\vcpkg-ce"
+ displayName: Collect dependencies
+ workingDirectory: vcpkg-ce
+ - task: ComponentGovernanceComponentDetection@0
+ displayName: Detect Components
+ inputs:
+ ignoreDirectories: vcpkg-ce/common/temp
+ - task: MicroBuildSigningPlugin@3
+ displayName: Install MicroBuild Signing
+ inputs:
+ signType: $(SignType)
+ zipSources: false
feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json'
- task: NuGetToolInstaller@1
inputs:
@@ -221,39 +280,50 @@ jobs:
feedsToUse: 'config'
restoreDirectory: '$(Build.SourcesDirectory)\packages'
- task: MSBuild@1
- displayName: 'Sign Windows and Linux Binaries'
+ displayName: 'Sign Individual Files'
inputs:
solution: 'azure-pipelines\signing.signproj'
msbuildArguments: '/p:OutDir=$(Build.BinariesDirectory)\ /p:IntermediateOutputPath=$(Build.BinariesDirectory)\'
- - task: BinSkim@3
- inputs:
- InputType: 'CommandLine'
- arguments: 'analyze "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.BinariesDirectory)\x86\tls12-download.exe" "$(Build.BinariesDirectory)\arm64\vcpkg.exe" "$(Build.BinariesDirectory)\arm64\tls12-download.exe"'
- task: MicroBuildSignMacFiles@1
displayName: 'Developer Sign Mac Files'
- condition: eq(variables.SignType, 'test')
+ condition: and(eq(variables.SignType, 'test'), succeeded())
inputs:
SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
SigningCert: 8003
- task: MicroBuildSignMacFiles@1
displayName: 'Sign and Harden Mac Files'
- condition: eq(variables.SignType, 'real')
+ condition: and(eq(variables.SignType, 'real'), succeeded())
inputs:
SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
SigningCert: 8023
- task: MicroBuildSignMacFiles@1
- condition: eq(variables.SignType, 'real')
+ condition: and(eq(variables.SignType, 'real'), succeeded())
inputs:
SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg-macos.zip'
SigningCert: '8020'
MacAppName: 'vcpkg'
+ - task: BinSkim@3
+ inputs:
+ InputType: 'CommandLine'
+ arguments: 'analyze "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.BinariesDirectory)\x86\tls12-download.exe" "$(Build.BinariesDirectory)\arm64\vcpkg.exe" "$(Build.BinariesDirectory)\arm64\tls12-download.exe"'
+ # Inject the NOTICE file. This must run after component detection.
+ - task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0
+ displayName: Generate NOTICE file
+ inputs:
+ outputfile: $(Build.BinariesDirectory)/vcpkg-ce/NOTICE.txt
+ - script: npm pack
+ displayName: Create vcpkg-ce Pack
+ workingDirectory: $(Build.BinariesDirectory)/vcpkg-ce
- task: CmdLine@2
- displayName: 'Prepare Drop'
+ displayName: 'Arrange Binaries in Drop'
inputs:
failOnStderr: true
script: |
mkdir "$(Build.ArtifactStagingDirectory)\drop"
+ move "$(Build.BinariesDirectory)\vcpkg-ce\vcpkg-ce-*.tgz" "$(Build.ArtifactStagingDirectory)\drop\ce.tgz"
+ move "$(Build.BinariesDirectory)\vcpkg-readonly-bundle.tar.gz" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-readonly-bundle.tar.gz"
+
move "$(Build.BinariesDirectory)\x86\vcpkg.exe" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.exe"
move "$(Build.BinariesDirectory)\x86\vcpkg.pdb" "$(Build.ArtifactStagingDirectory)\drop\vcpkg.pdb"
move "$(Build.BinariesDirectory)\x86\tls12-download.exe" "$(Build.ArtifactStagingDirectory)\drop\tls12-download.exe"
@@ -272,18 +342,82 @@ jobs:
move "$(Build.ArtifactStagingDirectory)\staging\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc"
- task: CmdLine@2
displayName: 'Add Drop PGP Signatures (real sign only)'
- condition: eq(variables.SignType, 'real')
+ condition: and(eq(variables.SignType, 'real'), succeeded())
inputs:
failOnStderr: true
script: |
move "$(Build.BinariesDirectory)\vcpkg-glibc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-glibc.sig"
move "$(Build.BinariesDirectory)\vcpkg-muslc" "$(Build.ArtifactStagingDirectory)\drop\vcpkg-muslc.sig"
+ # Do final compliance checks.
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
+ displayName: Check for compliance errors
+ # To avoid spurious warnings about missing logs, explicitly declare what we scanned.
+ inputs:
+ CredScan: true
+ PoliCheck: true
+ # Trust Services Automation (TSA) can automatically open bugs for compliance issues.
+ # https://www.1eswiki.com/wiki/Trust_Services_Automation_(TSA)
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-uploadtotsa.TSAUpload@1
+ displayName: Upload logs to TSA
+ inputs:
+ tsaVersion: TsaV2
+ codebase: NewOrUpdate
+ codeBaseName: vcpkg-ce
+ notificationAlias: embeddeddev@microsoft.com
+ instanceUrlForTsaV2: DEVDIV
+ projectNameDEVDIV: DevDiv
+ areaPath: DevDiv\Cpp Developer Experience\Cross Platform\Embedded
+ iterationPath: DevDiv
+ # To avoid spurious warnings about missing logs, explicitly declare what we don't upload.
+ uploadAPIScan: false
+ uploadBinSkim: false
+ uploadFortifySCA: false
+ uploadFxCop: false
+ uploadModernCop: false
+ uploadPREfast: false
+ uploadRoslyn: false
+ uploadTSLint: false
+ condition: eq(variables['Build.SourceBranchName'], 'main')
- task: PublishBuildArtifacts@1
displayName: 'Publish Drop'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\drop'
ArtifactName: 'Drop'
publishLocation: 'Container'
+ - task: DownloadSecureFile@1
+ displayName: Download Deploy Key
+ name: githubDeployKey
+ condition: and(eq(variables.SignType, 'real'), succeeded())
+ inputs:
+ secureFile: id_vcpkg_tool
+ # GitHub has a large, regularly changing set of IP address, so ignore the
+ # hostname and allow anything with the right key.
+ # https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/about-githubs-ip-addresses
+ # This public key should have the well-known fingerprint documented below.
+ # SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
+ # https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/githubs-ssh-key-fingerprints
+ - script: mkdir %USERPROFILE%\.ssh && echo * ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==>>%USERPROFILE%\.ssh\known_hosts
+ displayName: Store GitHub Public Key
+ condition: and(eq(variables.SignType, 'real'), succeeded())
+ - script: git -c user.email=embeddedbot@microsoft.com -c user.name="Embedded Bot" push git@github.com:microsoft/vcpkg-tool HEAD:refs/tags/%VCPKG_BASE_VERSION%
+ condition: and(eq(variables.SignType, 'real'), succeeded())
+ env:
+ GIT_SSH_COMMAND: ssh -i "$(githubDeployKey.secureFilePath)"
+ displayName: Push Release Tag
+ - task: GitHubRelease@0
+ displayName: Publish GitHub Release
+ condition: and(eq(variables.SignType, 'real'), succeeded())
+ inputs:
+ gitHubConnection: embeddedbot
+ repositoryName: microsoft/vcpkg-tool
+ isPreRelease: true
+ isDraft: true
+ title: $(VCPKG_BASE_VERSION) Release
+ tagSource: manual
+ tag: $(VCPKG_BASE_VERSION)
+ assets: "$(Build.ArtifactStagingDirectory)\\drop\\*"
+ addChangeLog: true
+ compareWith: 'lastFullRelease'
- task: MicroBuildCleanup@1
condition: succeededOrFailed()
displayName: MicroBuild Cleanup

ADD
azure-pipelines/vcpkg-ce-sha.txt
+7a20cda9cc4cb024572b1dd19154c8039df0d866

ADD
azure-pipelines/vcpkg-scripts-sha.txt
+a4b5cde7f504c1bbbbc455f4a6ee60efd9034772

MODIFY
src/vcpkg-test/commands.cpp
src/vcpkg-test/commands.cpp
@@ -46,6 +46,8 @@ TEST_CASE ("list of commands is correct", "[commands]")
"help",
"list",
"integrate",
+ "new",
+ "list",
"owns",
"update",
"edit",

MODIFY
src/vcpkg/archives.cpp
src/vcpkg/archives.cpp
@@ -116,6 +116,7 @@ namespace
void extract_archive_to_empty(const VcpkgPaths& paths, const Path& archive, const Path& to_path)
{
const auto ext = archive.extension();
+#if defined(_WIN32)
if (Strings::case_insensitive_ascii_equals(ext, ".nupkg"))
{
win32_extract_nupkg(paths, archive, to_path);
@@ -124,14 +125,13 @@ namespace
{
win32_extract_msi(archive, to_path);
}
-#if defined(_WIN32)
else if (Strings::case_insensitive_ascii_equals(ext, ".zip") ||
Strings::case_insensitive_ascii_equals(ext, ".7z"))
{
win32_extract_with_seven_zip(paths, archive, to_path);
}
#else
- else if (ext == ".zip")
+ if (ext == ".zip")
{
const auto code =
cmd_execute(Command{"unzip"}.string_arg("-qqo").path_arg(archive), InWorkingDirectory{to_path});

MODIFY
src/vcpkg/base/system.process.cpp
src/vcpkg/base/system.process.cpp
@@ -522,8 +522,7 @@ namespace vcpkg
// /analyze can't tell that we transferred ownership here
auto environment_block = env.m_env_data;
#pragma warning(suppress : 6335) // Leaking process information handle 'process_info.proc_info.hProcess'
- bool succeeded =
- TRUE == CreateProcessW(nullptr,
+ bool succeeded = TRUE == CreateProcessW(nullptr,
Strings::to_utf16(cmd_line).data(),
nullptr,
nullptr,

Add publishing of vcpkg-readonly-bundle and vcpkg-ce.