mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[upstream_utils] Use "git am" instead of "git apply" for patches (#4248)
This creates actual commits in the thirdparty repo, which makes rebasing them onto new versions much easier.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, apply_patches
|
||||
from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, am_patches
|
||||
|
||||
|
||||
def main():
|
||||
@@ -11,6 +11,14 @@ def main():
|
||||
"v0.37.0")
|
||||
wpimath = os.path.join(root, "wpimath")
|
||||
|
||||
prefix = os.path.join(root, "upstream_utils/drake_patches")
|
||||
am_patches(repo, [
|
||||
os.path.join(prefix, "0001-Replace-Eigen-Dense-with-Eigen-Core.patch"),
|
||||
os.path.join(
|
||||
prefix,
|
||||
"0002-Add-WPILIB_DLLEXPORT-to-DARE-function-declarations.patch")
|
||||
])
|
||||
|
||||
# Delete old install
|
||||
for d in [
|
||||
"src/main/native/cpp/drake", "src/main/native/include/drake",
|
||||
@@ -61,11 +69,6 @@ def main():
|
||||
os.path.join(wpimath, "src/test/native/include")
|
||||
])
|
||||
|
||||
apply_patches(root, [
|
||||
"upstream_utils/drake-replace-dense-with-core.patch",
|
||||
"upstream_utils/drake-dllexport-dare.patch"
|
||||
])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user