Skip to content
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

[Build] Support building site without CROWDIN_DOCUSAURUS_API_KEY #10804

Merged

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Jun 3, 2021

Motivation

The website build is currently broken and there's a need to debug the issues locally in order to fix the problems.

With the PR changes, it's possible to build the site with these commands locally:

mvn -B -ntp clean install -DskipTests -DskipSourceReleaseAssembly=true -Dspotbugs.skip=true -Dlicense.skip=true
mvn -B -ntp -pl pulsar-broker install -DskipTests -Pswagger
mkdir -p site2/website/static/swagger/master
cp pulsar-broker/target/docs/swagger*.json site2/website/static/swagger/master
site2/tools/docker-build-site.sh

Modifications

Support building site without CROWDIN_DOCUSAURUS_API_KEY

  • build the English language site when key isn't set


# TODO: remove this after figuring out why crowdin removed code tab when generating translated files
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are touching this file, can you move all the cp commands into a shell function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that something @tuteng or you could take care of since I'm not familiar with Crowdin. This PR simply makes it possible to run and debug the site building locally without the Crowdin parts.
I'd suggest that we do refactorings separately from this PR. Is that fine for you @sijie?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is nothing related to crowdin. this is just a review comment on the shell script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll extract a shell function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sijie I have now extracted a shell function. PTAL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I currently think this part can be removed, because newer versions since 2.5.2 have not added the corresponding content, but the site is built successfully, so I will consider doing a test to decide whether to remove the hack content

- build English site when key isn't set

- this is useful for debugging and improving the Website build
@lhotari lhotari force-pushed the lh-allow-running-website-build-locally branch from b34f43f to aca80df Compare June 3, 2021 17:30
@lhotari lhotari merged commit 0420520 into apache:master Jun 3, 2021
yangl pushed a commit to yangl/pulsar that referenced this pull request Jun 23, 2021
…che#10804)

* Support building site without CROWDIN_DOCUSAURUS_API_KEY

- build English site when key isn't set

- this is useful for debugging and improving the Website build

* Add review feedback: extract shell function
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…che#10804)

* Support building site without CROWDIN_DOCUSAURUS_API_KEY

- build English site when key isn't set

- this is useful for debugging and improving the Website build

* Add review feedback: extract shell function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants