vcpkg@2024.01.12: Add git repo integration for versioning (#5455)

* vcpkg: add git repo integration for versioning

* fix schema validation error

* persist_dir/dir in quotes, windows style slashes

* change git dependency to git suggestion

* check for git in PATH to run pre_install steps
This commit is contained in:
shad0wshayd3 2024-02-07 11:32:30 -07:00 committed by GitHub
parent 71fd59a79f
commit a4a40c6685
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,21 +3,41 @@
"description": "C/C++ dependency manager from Microsoft For all platforms, buildsystems, and workflows", "description": "C/C++ dependency manager from Microsoft For all platforms, buildsystems, and workflows",
"homepage": "https://vcpkg.io/", "homepage": "https://vcpkg.io/",
"license": "MIT", "license": "MIT",
"suggest": {
"Git": "git"
},
"url": "https://github.com/microsoft/vcpkg/archive/refs/tags/2024.01.12.zip", "url": "https://github.com/microsoft/vcpkg/archive/refs/tags/2024.01.12.zip",
"hash": "7d954679548c2b149e101b69223937bb2949fc64d405b31465d07db8363b7f73", "hash": "7d954679548c2b149e101b69223937bb2949fc64d405b31465d07db8363b7f73",
"extract_dir": "vcpkg-2024.01.12", "extract_dir": "vcpkg-2024.01.12",
"pre_install": [
"if (Get-Command \"git.exe\" -ErrorAction SilentlyContinue) {",
" if (!(Test-Path \"$persist_dir\")) {",
" New-Item -ItemType Directory -Path \"$persist_dir\" | Out-Null",
" }",
" if (!(Test-Path \"$persist_dir\\.git\")) {",
" git -C \"$dir\" init --quiet --separate-git-dir \"$persist_dir\\.git\"",
" git -C \"$dir\" remote add -t master origin https://github.com/microsoft/vcpkg",
" } else {",
" Write-Output \"gitdir: $persist_dir\\.git\" | Out-File -FilePath \"$dir\\.git\"",
" }",
" git -C \"$dir\" fetch --quiet --tags",
" git -C \"$dir\" reset --quiet --hard $version",
"} else {",
" Write-Host -F Yellow \"Git was not detected in PATH, skipping repository setup.\"",
"}"
],
"installer": { "installer": {
"file": "bootstrap-vcpkg.bat", "file": "bootstrap-vcpkg.bat",
"keep": true "keep": true
}, },
"bin": "vcpkg.exe",
"env_set": {
"VCPKG_ROOT": "$dir"
},
"post_install": "vcpkg integrate install", "post_install": "vcpkg integrate install",
"uninstaller": { "uninstaller": {
"script": "vcpkg integrate remove" "script": "vcpkg integrate remove"
}, },
"bin": "vcpkg.exe",
"env_set": {
"VCPKG_ROOT": "$dir"
},
"persist": [ "persist": [
"buildtrees", "buildtrees",
"downloads", "downloads",