Skip to content

Commit 7886e14

Browse files
committed
ci: Avoid vendoring past most recent tag
1 parent bd72827 commit 7886e14

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Diff for: vendor-one.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ for commit in $(git -C "$upstream_dir" log --first-parent --reverse --format="%H
4848
# Always vendor tags
4949
if [ $(git -C "$upstream_dir" describe --tags | grep -c -- -) -eq 0 ]; then
5050
message="chore: Update vendored sources (tag $(git -C "$upstream_dir" describe --tags)) to duckdb/duckdb@$commit"
51-
changed=1
5251
break
5352
fi
5453

@@ -65,6 +64,16 @@ if [ "$message" = "" ]; then
6564
exit 0
6665
fi
6766

67+
our_tag=$(git describe --tags --abbrev=0 | sed -r 's/-[0-9]$//')
68+
upstream_tag=$(git -C "$upstream_dir" describe --tags --abbrev=0)
69+
70+
if [ "$our_tag" != "$upstream_tag" ]; then
71+
echo "Not vendoring because our tag $our_tag is different from upstream tag $upstream_tag"
72+
git checkout -- src/duckdb
73+
rm -rf "$upstream_dir"
74+
exit 0
75+
fi
76+
6877
git add .
6978

7079
(

0 commit comments

Comments
 (0)