Skip to content

Commit

Permalink
Section Explaining deleteOldFiles (#2838)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: sciencewhiz <[email protected]>
  • Loading branch information
jasondaming and sciencewhiz authored Nov 11, 2024
1 parent 88374bc commit 8154ae7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions source/docs/software/advanced-gradlerio/compiler-args.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </docs/software/wpilib-tools/choreo/index>` 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 </docs/software/roborio-info/roborio-ftp>` provides one method to do so.
2 changes: 1 addition & 1 deletion source/docs/yearly-overview/yearly-changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <docs/software/advanced-gradlerio/compiler-args:Deleting Unused Deploy Files>` in the frcStaticFileDeploy block

## WPILib All in One Installer

Expand Down

0 comments on commit 8154ae7

Please sign in to comment.