mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-20 13:32:42 +08:00
Move vcpkg tool SHA1 sums to vcpkg_tool_release_tag.txt
It's easier to manage the vcpkg tool versions using this file, but not editing script each time. Change-Id: If6d04a8ac07731ec1fab46b1f663b86bbe640631 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
@@ -18,12 +18,43 @@ echo "Cloning the vcpkg repo"
|
||||
git clone "$vcpkgRepo" "$vcpkgRoot"
|
||||
git -C "$vcpkgRoot" checkout "tags/$vcpkgVersion"
|
||||
|
||||
vcpkgToolReleaseTag=$(grep 'vcpkg_tool_release_tag=' "${BASH_SOURCE%/*}/../shared/vcpkg_tool_release_tag.txt" | cut -d '=' -f 2)
|
||||
nonDottedReleaseTag=${vcpkgVersion//-/}
|
||||
releaseTagFile="${BASH_SOURCE%/*}/../shared/vcpkg_tool_release_tag.txt"
|
||||
for line in $(cat "$releaseTagFile")
|
||||
do
|
||||
IFS='='
|
||||
read -ra keyValue <<< "$line"
|
||||
unset IFS
|
||||
|
||||
case "${keyValue[0]}" in
|
||||
"vcpkg_tool_release_tag")
|
||||
vcpkgToolReleaseTag=${keyValue[1]}
|
||||
;;
|
||||
"linux_sha1")
|
||||
vcpkgToolSHA1=${keyValue[1]}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z vcpkgToolReleaseTag ]
|
||||
then
|
||||
echo "Unable to read release tag from $releaseTagFile"
|
||||
echo "Content:"
|
||||
cat $releaseTagFile
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z vcpkgToolSHA1 ]
|
||||
then
|
||||
echo "Unable to read vcpkg tool SHA1 from $releaseTagFile"
|
||||
echo "Content:"
|
||||
cat $releaseTagFile
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nonDottedReleaseTag=${vcpkgToolReleaseTag//-/}
|
||||
|
||||
vcpkgToolOfficialUrl="https://github.com/microsoft/vcpkg-tool/archive/refs/tags/$vcpkgToolReleaseTag.tar.gz"
|
||||
vcpkgToolCacheUrl="http://ci-files01-hki.ci.qt.io/input/vcpkg/vcpkg-tool-$nonDottedReleaseTag.tar.gz"
|
||||
vcpkgToolSHA1="99a31b0bed2845f5c915735121d34c453126ec76"
|
||||
vcpkgToolSourceFolder="$HOME/vcpkg-tool-$vcpkgToolReleaseTag"
|
||||
vcpkgToolBuildFolder="$HOME/vcpkg-tool-$vcpkgToolReleaseTag/build"
|
||||
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
vcpkg_tool_release_tag=2024-09-18
|
||||
windows_x64_sha1=484373186A905E9F39FE385F4FB59F263B9FFE95
|
||||
windows_arm64_sha1=E0C4CBCD64B867CE386886806D8CA9C84610545F
|
||||
linux_sha1=99a31b0bed2845f5c915735121d34c453126ec76
|
||||
|
||||
@@ -23,22 +23,38 @@ git.exe -C "$vcpkgRoot" checkout "tags/$vcpkgVersion"
|
||||
|
||||
# Download vcpkg-tool, i.e., vcpkg.exe
|
||||
|
||||
$n = Get-Content "$PSScriptRoot\..\shared\vcpkg_tool_release_tag.txt"
|
||||
$n = $n.Split('=')
|
||||
$vcpkgExeReleaseTag = $n[1]
|
||||
$releaseTagFileContent = Get-Content "$PSScriptRoot\..\shared\vcpkg_tool_release_tag.txt"
|
||||
$n = $releaseTagFileContent.Split("`n")
|
||||
$sha1key = "windows_" + $arch + "_sha1"
|
||||
foreach ($keyValue in $n) {
|
||||
$keyValue = $keyValue.Split('=')
|
||||
if($keyValue[0] -eq "vcpkg_tool_release_tag") {
|
||||
$vcpkgExeReleaseTag = $keyValue[1]
|
||||
} elseif($keyValue[0] -eq $sha1key) {
|
||||
$vcpkgExeSHA1 = $keyValue[1]
|
||||
}
|
||||
}
|
||||
|
||||
if(!$vcpkgExeReleaseTag) {
|
||||
Write-Host "Unable to read release tag from $PSScriptRoot\..\shared\vcpkg_tool_release_tag.txt"
|
||||
Write-Host "Content:"
|
||||
Write-Host "$releaseTagFileContent"
|
||||
exit 1
|
||||
}
|
||||
$nonDottedReleaseTag = $vcpkgExeReleaseTag.replace('-', "")
|
||||
|
||||
if(!$vcpkgExeSHA1) {
|
||||
Write-Host "Unable to read vcpkg tool SHA1 from $PSScriptRoot\..\shared\vcpkg_tool_release_tag.txt"
|
||||
Write-Host "Content:"
|
||||
Write-Host "$releaseTagFileContent"
|
||||
exit 1
|
||||
}
|
||||
|
||||
$suffix = "-$arch"
|
||||
if($arch -eq "x64") {
|
||||
$suffix = ""
|
||||
}
|
||||
|
||||
if($arch -eq "x64") {
|
||||
$vcpkgExeSHA1 = "484373186A905E9F39FE385F4FB59F263B9FFE95"
|
||||
} elseif($arch -eq "arm64") {
|
||||
$vcpkgExeSHA1 = "E0C4CBCD64B867CE386886806D8CA9C84610545F"
|
||||
}
|
||||
|
||||
$vcpkgExeOfficialUrl = "https://github.com/microsoft/vcpkg-tool/releases/download/$vcpkgExeReleaseTag/vcpkg$suffix.exe"
|
||||
$vcpkgExeCacheUrl = "\\ci-files01-hki.ci.qt.io\provisioning\vcpkg\vcpkg-$nonDottedReleaseTag-windows-$arch.exe"
|
||||
$vcpkgExe = "C:\Windows\Temp\vcpkg.exe"
|
||||
|
||||
Reference in New Issue
Block a user