Skip to content

Commit

Permalink
ci: Avoid vendoring past most recent tag
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Mar 23, 2024
1 parent bd72827 commit 7886e14
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vendor-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ for commit in $(git -C "$upstream_dir" log --first-parent --reverse --format="%H
# Always vendor tags
if [ $(git -C "$upstream_dir" describe --tags | grep -c -- -) -eq 0 ]; then
message="chore: Update vendored sources (tag $(git -C "$upstream_dir" describe --tags)) to duckdb/duckdb@$commit"
changed=1
break
fi

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

our_tag=$(git describe --tags --abbrev=0 | sed -r 's/-[0-9]$//')
upstream_tag=$(git -C "$upstream_dir" describe --tags --abbrev=0)

if [ "$our_tag" != "$upstream_tag" ]; then
echo "Not vendoring because our tag $our_tag is different from upstream tag $upstream_tag"
git checkout -- src/duckdb
rm -rf "$upstream_dir"
exit 0
fi

git add .

(
Expand Down

0 comments on commit 7886e14

Please sign in to comment.