New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tasks.do-copy-apidocs #444
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.32.2 #444 +/- ##
==========================================
+ Coverage 92.61% 92.77% +0.16%
==========================================
Files 91 91
Lines 17635 17639 +4
==========================================
+ Hits 16333 16365 +32
+ Misses 1302 1274 -28
Continue to review full report at Codecov.
|
thanks a lot for the PR. |
with |
you mean when the project is a workspace? in that case, i guess the best fix is to set it up correctly for those type of projects as well. |
Ok, here is my take on it with duckscript. |
Thanks a lot. looks promising. i'm going to locally test it as well. probably tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it seems to work great, thanks a lot.
lets do few minor changes and then i'll push it in.
i want it to be part of the next release.
SOURCE_DIRECTORY=${CARGO_MAKE_DOCS_ROOT_FOLDER}/target/doc | ||
TARGET_DIRECTORY=${CARGO_MAKE_DOCS_ROOT_FOLDER}/docs/api/${CARGO_MAKE_DOCS_SUB_FOLDER} | ||
if is_empty ${CARGO_MAKE_DOCS_SUB_FOLDER} | ||
SOURCE_DIRECTORY= set ${CARGO_MAKE_DOCS_ROOT_FOLDER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since SOURCE_DIRECTORY is now actually a variable, can we name it source_dir or something short?
same goes for other variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
||
echo Source Directory: ${SOURCE_DIRECTORY} | ||
echo Target Directory: ${TARGET_DIRECTORY} | ||
|
||
mkdir -p ${TARGET_DIRECTORY} | ||
mv ${SOURCE_DIRECTORY}/* ${TARGET_DIRECTORY} | ||
if is_dir ${TARGET_DIRECTORY} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to check if the dir exists. you can just remove. it won't break if it doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
SOURCE_DIRECTORY= set ${SOURCE_DIRECTORY}/target/doc | ||
end | ||
|
||
if is_empty ${CARGO_MAKE_DOCS_SUB_FOLDER} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case to make sure CARGO_MAKE_DOCS_SUB_FOLDER is defined, let change to:
if is_empty "${CARGO_MAKE_DOCS_SUB_FOLDER}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
1. It didn't work with a non-default target specified e.g. in `.cargo/config` 2. It didn't work with `CARGO_MAKE_CRATE_WORKSPACE_MEMBERS` 3. It didn't work when running `cargo make docs-flow` multiple times
thanks a lot for the PR. merging |
.cargo/config
CARGO_MAKE_CRATE_WORKSPACE_MEMBERS
cargo make docs-flow
multiple times