Skip to content

Commit e10f667

Browse files
committed
Revert "sourcebuild: try to fix version..."
This reverts commit 01c2355. It doesn't fix the issue either...
1 parent 01c2355 commit e10f667

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setupsrc/pypdfium2_setup/build_pdfium.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,11 @@ def dl_pdfium(GClient, do_update, revision):
103103

104104
if is_sync:
105105
# TODO consider passing -D ?
106-
# FIXME Have to use --with-branch-heads, and unable to use --shallow --no-history because of versioning. This probably makes checkout *much* slower, but not sure how to properly get the version heads afterwards. If we just fetch a fixed number of commits, the versions do appear in git log but land in the remotes refspace, which confuses git describe.
107-
run_cmd([GClient, "sync", "--revision", f"origin/{revision}", "--with_branch_heads"], cwd=SBDir)
106+
run_cmd([GClient, "sync", "--revision", f"origin/{revision}", "--no-history", "--shallow"], cwd=SBDir)
107+
# quick & dirty fix to make a version annotated commit available - pdfium gets versioned very frequently, so this should be more than enough
108+
# TODO tighten to check out only up to the latest tag
109+
# FIXME the repository is still left in a very confusing state - maybe we should just drop --no-history --shallow for simplicity?
110+
run_cmd(["git", "fetch", "--depth=100"], cwd=PDFiumDir)
108111

109112
return is_sync
110113

0 commit comments

Comments
 (0)