8000 Merge pull request #41 from rustagir/update-readme · mongodb/docs-java-other@f00eca5 · GitHub
[go: up one dir, main page]

Skip to content

Commit f00eca5

Browse files
authored
Merge pull request #41 from rustagir/update-readme
Update README
2 parents b78d3dd + 3c735c8 commit f00eca5

File tree

1 file changed

+24
-42
lines changed

1 file changed

+24
-42
lines changed

README.md

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This repo contains build tools for the following driver documentation:
44

5-
- Reactive Streams (Reference and API)
6-
- Scala (Reference and API)
5+
- Reactive Streams (legacy reference and API)
6+
- Scala (legacy reference and API)
77
- Java Sync (legacy reference and current API)
88

99
The aforementioned documentation resides in the "gh-pages" branch of
@@ -13,75 +13,57 @@ For the current Java Sync driver reference documentation, see the
1313
[Java Sync reference docs site](https://www.mongodb.com/docs/drivers/java/sync)
1414
or the source in the [docs-java repository](https://github.com/mongodb/docs-java).
1515

16-
## Build Requirements
17-
18-
- Intel Mac or x64 PC (for hugo)
19-
- [hugo v0.25.x](https://github.com/gohugoio/hugo/releases/tag/v0.25.1) (any other version may not generate the documentation correctly)
20-
- The [https://github.com/mongodb/docs-java-other](docs-java-other) and [https://github.com/mongodb/mongo-java-driver](mongo-java-driver) repos cloned to your local machine (ensure you have appropriate SSH keys to access them)
21-
22-
:warning: **If you are running on an Apple M1 CPU, you may not be able to find a working binary for Hugo v0.25.x.** and will need to set up an Ubuntu Docker Image for the linux/amd64 arch. See [docker-java-gh-docs](https://github.com/mongodb/docs-java-other/tree/main/tools/README.md) for information on setting this up.
23-
24-
## Build Instructions
25-
26-
:warning: **When building docs for a new version, update the following items:**
27-
- `<this repo>/reference/config.toml` file to point to the new base version
28-
- `<this repo>/landing/data/releases.toml` file to link to the docs for the new version
29-
- `<thid repo>/reference/data/mongodb.toml` file to display the mew version
30-
- `<reference/content/driver-reactive/getting-started/installation.md` and `<reference/content/driver-scala/getting-started/installation.md` files to display the new version
31-
- Update the "Previous Versions" sections for the Scala and Java RS driver docs which are in ``reference/content/<driver name directory>/index.md``
32-
- Meta redirects as shown in this PR [Java sync docs redirect](https://github.com/mongodb/docs-java-other/pull/3/files#diff-0f1a8692163867f83ff7451f3018bae71d3d16dbee396abf03263784e5dda940)
33-
34-
After updating the documentation, submit a pull request for approval.
35-
36-
Once your PR is approved and merged, pull the latest changes.
37-
Then run the `publish-docs` script with the version using the
38-
format `<major>.<minor>`:
39-
40-
```sh
41-
./publish-docs <version, e.g. 4.7>
42-
```
43-
44-
This command updates the submodule that tracks the *gh-pages* branch
45-
of the [mongo-java-driver](https://github.com/mongodb/mongo-java-driver).
46-
Then it builds the documentation in a new directory that corresponds to the
47-
new version name.
16+
**Now that Java RS and Scala documentation is built on Snooty, you do not
17+
have to update the legacy documentation site.**
4818

4919
## Building API Documentation
5020

5121
Always build the API docs for any new major and minor releases.
5222

53-
To build the API docs, navigate to your `mongo-java-driver` repo
54-
(*Note: NOT the submodule in this repo*) and executing the appropriate `gradlew` command
55-
after checking out the correct tag. Ensure you installed the Java version specified in the `:bson:compileJava` task in your development environment prior to building.
23+
To build the API docs, navigate to your `mongo-java-driver` repo
24+
(_Note: NOT the submodule in this repo_) and execute the appropriate `gradlew` command
25+
after checking out the correct tag. Ensure you installed the Java
26+
version specified in the `:bson:compileJava` task in your development
27+
environment prior to building. In the most recent (5/2024) deploy, this
28+
was Java 17.
5629

57-
:warning: **Use the GitHub "release" that correspond to the version of the driver rather than a branch**
30+
:warning: **Use the GitHub "release" that corresponds to the version of the driver rather than a branch**
5831

59-
For example, to build the API docs for the 4.4 release of driver run the following commands:
32+
For example, to build the API docs for the 4.4 release of the driver run the following commands:
6033

6134
```sh
6235
git checkout r4.4.0
6336
./gradlew clean docs
6437
```
6538

39+
You need to create the `<version>/apidocs` directory yourself before
40+
copying the generated API docs files.
41+
42+
Run the following commands to create the `apidocs` directory:
43+
44+
````sh
45+
cd docs-java-other/mongo-java-driver
46+
mkdir -p <version>/apidocs
47+
```
48+
6649
Then copy the `build/docs` folder into the `apidocs` directory. For example,
6750
if the `mongo-java-driver` repo is on a sibling level with this repo, run the following command:
6851

6952
```sh
7053
cp -a ../mongo-java-driver/build/docs ./mongo-java-driver/<version>/apidocs
71-
```
54+
````
7255
7356
Your submodule directory should contain a directory structure that resembles the following:
7457
7558
```sh
7659
<this repo>/<submodule directory>/<version>/apidocs/{bson,mongodb-driver-core,mongodb-driver-sync,mongodb-driver-legacy, mongodb-driver-reactivestreams/}
7760
```
7861
79-
8062
## Publishing
8163
8264
To publish the documentation, run the following commands in your shell from the `docs-java-other` repository location:
8365
84-
```js
66+
```sh
8567
cd mongo-java-driver
8668
git add .
8769
git commit -m <message>

0 commit comments

Comments
 (0)
0