Commit 8d4db3e
committed
Auto merge of #7905 - ehuss:license-file-updates, r=alexcrichton
Better support for license-file.
This adds some changes to how `cargo package` and `cargo publish` handle the `license-file` field. This also incorporates some refactoring which hopefully makes the code a little clearer and straightforward, but which also resulted in some minor behavior changes.
* Warn if license-file points to a non-existent file.
* Automatically include license-file, even if it is not listed in the `package.include` list (similar to how Cargo.toml/lock are automatically included).
* If license-file points outside of the package root, copy the file to the package root (and rewrite the field in Cargo.toml).
* Files are now sorted when archived.
* `Archiving: Cargo.toml.orig` is explicitly printed where before it did not report that.
* `cargo package --list` now shows `Cargo.toml.orig` where before it was not reported.
Closes #3537
Closes #7830File tree
7 files changed
+495
-208
lines changed- src/cargo
- core
- ops
- util/toml
- tests/testsuite
7 files changed
+495
-208
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
| |||
0 commit comments