You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs.rs needs to be cloned before you can change to /path/to/docs.rs
"docker build —tag build-env ." must be run in directory linux inside crates-build-env
in docs.rs the .env.sample needs to be copied to .env
environment variable DOCS_RS_LOCAL_DOCKER_IMAGE is outdated and must be replaced with DOCSRS_DOCKER_IMAGE
lint.sh is in the root directory of crates-build-env
new Ubuntu version respected
moved defining the crate directory to the beginning
mentioned alphabetical order when adding package name of dependency
Next, add the package to `packages.txt`. This should be the name of a package in the **Ubuntu 18.04** Repositories. See [the package home page](https://packages.ubuntu.com/) for a full list/search bar, or use `apt search` locally.
14
+
Set the path to the directory of your crate. This must be an absolute path, not a relative path! On platforms with coreutils, you can instead use `$(realpath ../relative/path)` (relative to the docs.rs directory).
15
+
16
+
```sh
17
+
YOUR_CRATE=/path/to/your/crate
18
+
```
19
+
20
+
## Add package
21
+
22
+
Next, add the package to `crates-build-env/linux/packages.txt` in the correct alphabetical order. This should be the name of a package in the **Ubuntu 20.04** Repositories. See [the package home page](https://packages.ubuntu.com/) for a full list/search bar, or use `apt search` locally.
14
23
15
24
## Building the image
16
25
17
26
Now build the image. This will take a very long time, probably 10-20 minutes.
# NOTE: this must be an absolute path, not a relative path
31
-
# On platforms with coreutils, you can instead use `$(realpath ../relative/path)`
32
-
YOUR_CRATE=/path/to/your/crate
33
41
# avoid docker-compose creating the volume if it doesn't exist
34
42
if [ -e"$YOUR_CRATE" ];then
35
-
docker-compose run -e DOCS_RS_LOCAL_DOCKER_IMAGE=build-env \
43
+
docker-compose run -e DOCSRS_DOCKER_IMAGE=build-env \
36
44
-e RUST_BACKTRACE=1 \
37
45
-v "$YOUR_CRATE":/opt/rustwide/workdir \
38
46
web build crate --local /opt/rustwide/workdir
@@ -49,17 +57,23 @@ On line 7 of the Dockerfile, add this line: `RUN apt-get install -y your_second_
49
57
Rerun the build and start the container; it should take much less time now:
50
58
51
59
```sh
52
-
cd/path/to/crates-build-env
60
+
cd../crates-build-env/linux
53
61
docker build --tag build-env .
54
-
cd/path/to/docs.rs
62
+
cd../../docs.rs
55
63
docker-compose run -e DOCS_RS_LOCAL_DOCKER_IMAGE=build-env \
64
+
-e RUST_BACKTRACE=1 \
56
65
-v "$YOUR_CRATE":/opt/rustwide/workdir \
57
66
web build crate --local /opt/rustwide/workdir
58
67
```
59
68
60
69
## Run the lint script
61
70
62
-
Before you make a PR, run the shell script `ci/lint.sh` and make sure it passes. It ensures `packages.txt` is in order and will tell you exactly what changes you need to make if not.
71
+
Before you make a PR, run the shell script `lint.sh` and make sure it passes. It ensures `packages.txt` is in order and will tell you exactly what changes you need to make if not.
0 commit comments