|
| 1 | +The `eng` folder contains and is used by parts of the https://github.com/dotnet/arcade SDK. |
| 2 | + |
| 3 | +## Dependency Management |
| 4 | +The Arcade SDK contains a tool known as [`darc`][0], which can be used to manage |
| 5 | +and query the relationships between repositories in the dotnet ecosystem. |
| 6 | + |
| 7 | +The `eng/Version.Details.xml` and `eng/Versions.props` files contain information |
| 8 | +about the products and tooling that this repository depends on. |
| 9 | + |
| 10 | +Many dotnet repositories use a publishing workflow that will push build artifact data |
| 11 | +to a central location known as the "Build Asset Registry". This data includes |
| 12 | +a "channel" association, which is used to determine when an update for a particular |
| 13 | +product or tool is available. Local updates and automatic update "subscriptions" |
| 14 | +compare the version files in the repository against the versions avalable in the |
| 15 | +channel that you are interested in. The `darc` tool is used facilitate these updates. |
| 16 | + |
| 17 | +To work with `darc` locally, see the [setting up your darc client docs][1]. |
| 18 | +You'll need to run a script in the dotnet/arcade repo to install the dotnet global |
| 19 | +tool, join the `arcade-contrib` GitHub team, and run the [`darc authenticate`][2] |
| 20 | +command to add the PATs required by the tool. |
| 21 | + |
| 22 | +The GitHub PAT that you add must have the full `repo` scope enabled if you want to |
| 23 | +work with any of the `subcription` commands. Subscriptions control the automated |
| 24 | +creation of dependency update pull requests. |
| 25 | + |
| 26 | + |
| 27 | +To add a new dependency, run the [`darc add-dependency`][3] command at the root |
| 28 | +of the repository: |
| 29 | +``` |
| 30 | +darc add-dependency -n Microsoft.Dotnet.Sdk.Internal -t product -v 6.0.0-preview.2.21154.6 -r https://github.com/dotnet/installer |
| 31 | +``` |
| 32 | + |
| 33 | +To update all dependencies, use the [`darc update-dependencies`][4] command: |
| 34 | +``` |
| 35 | +darc update-dependencies --channel ".NET 6" |
| 36 | +``` |
| 37 | + |
| 38 | +To configure automatic updates, use the [`darc add-subscription`][5] command |
| 39 | +to enroll a target repo/branch into updates from a particular channel: |
| 40 | +``` |
| 41 | +darc add-subscription --channel ".NET 6" --source-repo https://github.com/dotnet/installer --target-repo https://github.com/dotnet/maui --target-branch main --update-frequency everyWeek --standard-automerge |
| 42 | +``` |
| 43 | + |
| 44 | +Once a subscription is configured, pull requests will be created automatically |
| 45 | +by the dotnet Maestro bot whenever dependency updates are available. |
| 46 | + |
| 47 | +Subscriptions need to be manually managed at this time. For example, when a |
| 48 | +release branch is created, someone with `darc` installed locally will need to |
| 49 | +run the `add-subscription` command to configure updates against that new branch. |
| 50 | + |
| 51 | + |
| 52 | +[0]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md |
| 53 | +[1]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md#setting-up-your-darc-client |
| 54 | +[2]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md#authenticate |
| 55 | +[3]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md#add-dependency |
| 56 | +[4]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md#update-dependencies |
| 57 | +[5]: https://github.com/dotnet/arcade/blob/ea609b8e036359934332480de9336d98fcbb3f91/Documentation/Darc.md#add-subscription |
0 commit comments