Skip to content

Commit

Permalink
Add deprecation to upgrade guide for new includes dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rcdailey committed Apr 22, 2024
1 parent ae15fe0 commit 16e059d
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions docs/upgrade-guide/v7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,97 @@ the Trash Guides.

[ref]: /yaml/config-reference/index.md
[config_create]: ../cli/config/config-create.md#template

## Deprecations

These features still work, but they will stop working in a future release.

### Dedicated Includes Directory {#include-dir}

The root directory for relative local include paths has changed. Previously, relative paths provided
to the [`config` include directive](../yaml/config-reference/include.md#config) were rooted in
`${appdatadir}/configs`. Putting includes in the `configs` directory is now deprecated. Going
forward, all includes should reside in `${appdatadir}/includes`.

Migrating to the new directory is simple. Simply cut & paste any subdirectories containing include
template YAML files to the new `includes` subdirectory. Assume you have the current structure:

```txt
.
├── configs/
│ ├── config1.yml
│ ├── config2.yml
│ └── local/
│ ├── my-include1.yml
│ └── my-include2.yml
└── includes/
```

An empty top-level `includes` will be created for you by Recyclarr. In the example above, we need to
move the `local` directory to this top-level `includes` directory. The final structure should look
like this:

```txt
.
├── configs/
│ ├── config1.yml
│ └── config2.yml
└── includes/
└── local/
├── my-include1.yml
└── my-include2.yml
```

By doing this, the relative paths in your `templates` section does not need to change:

```yml
include:
- config: local/my-include1.yml
- config: local/my-include2.yml
```
#### Recommended File Structure Changes (Optional) {#rec-structure-change}
If you followed the recommended file structure for your includes, then chances are you already have
a `configs/include` directory. To avoid having the path look weird, such as
`includes/include/my-include1.yml`, it is recommended that you remove the intermediate `include`
directory or rename it. For example, you could change this:

```yml
include:
- config: include/my-include1.yml
- config: include/my-include2.yml
```

To:

```yml
include:
- config: my-include1.yml
- config: my-include2.yml
```

And have your filesystem change from:

```txt
.
├── configs/
│ ├── config1.yml
│ └── config2.yml
└── includes/
└── include/
├── my-include1.yml
└── my-include2.yml
```

To this:

```txt
.
├── configs/
│ ├── config1.yml
│ └── config2.yml
└── includes/
├── my-include1.yml
└── my-include2.yml
```

0 comments on commit 16e059d

Please sign in to comment.