Repository navigation
Fix the bug that the redirection file is not copied when building - #263
Conversation
Signed-off-by: Li Li <[email protected]>
tisonkun
left a comment
There was a problem hiding this comment.
Thanks for taking care of this issue! Looks good to me.
Comment inline. And you can write close apache/pulsar#18174 instead of just referring it.
|
|
||
| cp -r build-assets/* build/assets/ | ||
| rm -rf build-assets | ||
| cp static/.htaccess build/ |
There was a problem hiding this comment.
Shall we copy all static files to build here and specially handle the hidden files like .htaccess?
In this way, we don't have to specially copy static files in:
pulsar-site/site2/tools/build-site.sh
Lines 45 to 62 in c30db65
There was a problem hiding this comment.
It seems that we don't need this line then.
Signed-off-by: Li Li <[email protected]>
tisonkun
left a comment
There was a problem hiding this comment.
It seems that if we simply write:
cp -R ./build/ "$CONTENT_DIR"We can copy the hidden files as well. No need for special handling.
Signed-off-by: Li Li <[email protected]>
|
fixed, PTAL again, thanks @tisonkun |
|
|
||
| cp -r build-assets/* build/assets/ | ||
| rm -rf build-assets | ||
| cp static/.htaccess build/ |
There was a problem hiding this comment.
It seems that we don't need this line then.
| | xargs rm -rf | ||
| fi | ||
| cp -r $GENERATED_SITE_DIR/content/* $PULSAR_SITE_TMP/content | ||
| cp -r $GENERATED_SITE_DIR/content/ $PULSAR_SITE_TMP/content |
There was a problem hiding this comment.
Perhaps using -R to avoid behavior inconsistency. For the implementation on a darwin OS:
Historic versions of the cp utility had a -r option. This implementation
supports that option, however, its behavior is different from historical
FreeBSD behavior. Use of this option is strongly discouraged as the
behavior is implementation-dependent. In FreeBSD, -r is a synonym for -RL
and works the same unless modified by other flags. Historical
implementations of -r differ as they copy special files as normal files
while recreating a hierarchy.
| # cp -R "$GEN_SITE_DIR"/api "$CONTENT_DIR" | ||
| cp -R ./build/* "$CONTENT_DIR" | ||
| cp -R ./build/ "$CONTENT_DIR" | ||
| cp -R "$WEBSITE_DIR"/static/swagger/* "$CONTENT_DIR"/swagger/ |
There was a problem hiding this comment.
Perhaps we don't need this line since the static swagger is copyed at the line above.
There was a problem hiding this comment.
And we can add a ls command here to debug why https://github.com/apache/pulsar-site/actions/runs/3317429325/jobs/5480293467 failed.
* main: (1021 commits) Docs sync done from apache/pulsar(#6cc30c9) Add python client doc for 2.10.2 (apache#260) [cleanup][doc] Remove incubating documents from the site repo (apache#267) Docs sync done from apache/pulsar(#6cc30c9) Docs sync done from apache/pulsar(#6cc30c9) Docs sync done from apache/pulsar(#82237d3) Docs sync done from apache/pulsar(#82237d3) fix build process to release content in a correct layout (apache#265) fix build error caused by cp swagger dir (apache#264) Fix the bug that the redirection file is not copied when building (apache#263) Docs sync done from apache/pulsar(#573c8f6) Docs sync done from apache/pulsar(#e913a10) Docs sync done from apache/pulsar(#d1b5c02) Redirect incubating docs to pulsar.staged.apache.org (apache#261) Docs sync done from apache/pulsar(#39270f0) Docs sync done from apache/pulsar(#55d6c5f) Docs sync done from apache/pulsar(#c55be38) Docs sync done from apache/pulsar(#c55be38) Docs sync done from apache/pulsar(#c55be38) Docs sync done from apache/pulsar(#845d992) ... # Conflicts: # site2/website-next/package-lock.json # site2/website-next/package.json # site2/website-next/src/css/custom.css # site2/website-next/yarn.lock
close apache/pulsar#18174