From 8154ae787ada164dea7dbad4658db85027803f65 Mon Sep 17 00:00:00 2001 From: Jason Daming Date: Sun, 10 Nov 2024 20:16:24 -0600 Subject: [PATCH] Section Explaining deleteOldFiles (#2838) --------- Co-authored-by: sciencewhiz --- .../advanced-gradlerio/compiler-args.rst | 16 ++++++++++++++++ source/docs/yearly-overview/yearly-changelog.rst | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source/docs/software/advanced-gradlerio/compiler-args.rst b/source/docs/software/advanced-gradlerio/compiler-args.rst index 2979016a53..deb1c64612 100644 --- a/source/docs/software/advanced-gradlerio/compiler-args.rst +++ b/source/docs/software/advanced-gradlerio/compiler-args.rst @@ -41,3 +41,19 @@ frcJava(getArtifactClass('FRCJavaArtifact')) { } ``` +## Deleting Unused Deploy Files + +By default the `src/main/deploy` directory in your project is transferred to the roboRIO when code is deployed. It is initiated by this section of the `build.gradle` file. + +```groovy +frcStaticFileDeploy(getArtifactTypeClass('FileTreeArtifact')) { + files = project.fileTree('src/main/deploy') + directory = '/home/lvuser/deploy' + deleteOldFiles = false // Change to true to delete files on roboRIO that no + // longer exist in deploy directory on roboRIO +} +``` + +This will overwrite any duplicate files found in the `/home/lvuser/deploy` directory on the RIO and copy over any additional not present there. If `deleteOldFiles` is false it will not remove any files no longer present in the project deploy directory. Changing it to `true` helps prevent programs like :doc:`Choreo ` and [PathPlanner](https://github.com/mjansen4857/pathplanner) from getting confused by files that were deleted locally but still exist on the roboRIO. + +If you want to manage the roboRIO files directly, the :doc:`FTP documentation ` provides one method to do so. diff --git a/source/docs/yearly-overview/yearly-changelog.rst b/source/docs/yearly-overview/yearly-changelog.rst index dcebc233e3..720fcf5a48 100644 --- a/source/docs/yearly-overview/yearly-changelog.rst +++ b/source/docs/yearly-overview/yearly-changelog.rst @@ -165,7 +165,7 @@ Supported Operating Systems and Architectures: - Use Gradle 8.10.2 - Use shell scripts for launching tools on Linux / macOS, since macOS doesn't ship Python any more -- Add method to delete files on roboRIO that have been deleted in the deploy directory. Set deleteOldFiles to true in the frcStaticFileDeploy block +- Add method to delete files on roboRIO that have been deleted in the deploy directory. :ref:`Set deleteOldFiles to true ` in the frcStaticFileDeploy block ## WPILib All in One Installer