Skip to content

Commit 59fd61a

Browse files
authored
ci: correctly extract and update hash values (#259)
1 parent e085bbe commit 59fd61a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ jobs:
102102
install_output=$(vcpkg install ${dir##ports/} --overlay-ports=ports) || status=$?
103103
if [[ ! $status -eq 0 ]]; then
104104
echo " Update hash on $dir/portfile.cmake"
105-
expected=$(echo "$install_output" | grep -oP "(?<=Expected hash: ).{128}")
106-
actual=$(echo "$install_output" | grep -oP "(?<=Actual hash: ).{128}")
105+
hashes=$(echo "$install_output" | grep -oP "(?<=: )[\d\w]{128}")
106+
expected=$(echo $hashes | cut -d' ' -f1)
107+
actual=$(echo $hashes | cut -d' ' -f2)
107108
sed -i "s@${expected}@${actual}@g" "$dir/portfile.cmake"
108109
echo " Expected hash: ${expected}"
109110
echo " Actual hash: ${actual}"

0 commit comments

Comments
 (0)