-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: fix
cargo publish
by symlinking cli/docs->docs
I think `cargo publish` will currently fail because of the `include_str!()` in `cli/src/commands/help.rs` pointing to `../../../docs/`, i.e. outside of the crate directory. This patch attempts to fix that creating a `cli/docs` symlink to `docs` and makes the `include_str!` use that symlink. I hope the symlink will be resolved at `cargo publish` time so it also works in the published crate. Because symlinks don't work well on Windows, I updated `cli/build.rs` to include the original path (the one pointing outside the crate) if `cli/docs` is not a symlink, so the regular build still should work on Windows (but `cargo publish` won't). Thanks to Yuya for proposing this solution.
- Loading branch information
1 parent
1042448
commit e4bf147
Showing
5 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters