Skip to content

Commit 1f10ab4

Browse files
authored
MINOR: [Release] Fix issue in post-14-vcpkg.sh causing x-add-version to fail (#47156)
### Rationale for this change I ran into this running post-14-vcpkg.sh for the 21.0.0 release in microsoft/vcpkg#46477 (review). If "port-version" exists in vcpkg.json, x-add-version fails with, ``` warning: In arrow, 21.0.0 is a completely new version, so there should be no "port-version". Remove "port-version" and try again. To skip this check, rerun with --skip-version-format-check . ``` This looks like a warning but it's actually a hard error and will cause your upstream PR to bounce. ### What changes are included in this PR? The script now removes the "port-version" field by default. I think the reason this worked sometimes and not others was because the field is supposed to be absent when 0 and it's usually 0 so our scripts don't need to update it. ### Are these changes tested? Yes. Locally. ### Are there any user-facing changes? No. Authored-by: Bryce Mecum <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 77303da commit 1f10ab4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dev/release/post-14-vcpkg.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,29 @@ sha512sum=$(curl \
6161
--location \
6262
"https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${version}/apache-arrow-${version}.tar.gz.sha512" | \
6363
cut -d' ' -f1)
64+
65+
# update "version"
6466
sed \
6567
-i.bak \
6668
-e "s/^ \"version\": \".*\",$/ \"version\": \"${version}\",/" \
6769
${port_arrow}/vcpkg.json
6870
rm ${port_arrow}/vcpkg.json.bak
71+
72+
# remove "port-version"
73+
# if we don't remove this, x-add-version fails
74+
sed \
75+
-i.bak \
76+
-e "/^.*\"port-version\":.*$/d" \
77+
${port_arrow}/vcpkg.json
78+
rm ${port_arrow}/vcpkg.json.bak
79+
80+
# update portfile
6981
sed \
7082
-i.bak \
7183
-e "s/^ SHA512 .*$/ SHA512 ${sha512sum}/" \
7284
${port_arrow}/portfile.cmake
7385
rm ${port_arrow}/portfile.cmake.bak
86+
7487
git add ${port_arrow}/vcpkg.json
7588
git add ${port_arrow}/portfile.cmake
7689
git commit -m "[arrow] Update to ${version}"

0 commit comments

Comments
 (0)