From 3aecab7f3c876cd68baa88ae194236689efcf996 Mon Sep 17 00:00:00 2001 From: Bruno FS Ciconelle Date: Wed, 18 Oct 2023 16:51:01 -0300 Subject: [PATCH] fixup! Post review improvements --- docs/usage.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index ff2901143..a1a74446e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -512,6 +512,13 @@ cachi2 fetch-deps --source bat '{"type": "cargo"}' ### Generate environment variables (cargo) +At the moment no env var is generated for cargo, but let's do this step for compatibility +with other integrations. + +```shell +cachi2 generate-env ./cachi2-output -o ./cachi2.env --for-output-dir /tmp/cachi2-output +``` + ### Inject project files (cargo) ```shell @@ -551,6 +558,7 @@ CMD bat ```shell podman build . \ --volume "$(realpath ./cachi2-output)":/tmp/cachi2-output:Z \ + --volume "$(realpath ./cachi2.env)":/tmp/cachi2.env:Z \ --network none \ --tag bat ``` @@ -568,11 +576,15 @@ cachi2 fetch-deps --source dummy '[{"type": "pip"}, {"type": "cargo", "lock_file ### Generate environment variables (pip + cargo) +```shell +cachi2 generate-env ./cachi2-output -o ./cachi2.env --for-output-dir /tmp/cachi2-output +``` + ### Inject project files (pip + cargo) ```shell $ cachi2 inject-files $(realpath cachi2-output) --for-output-dir /tmp/cachi2-output -2023-10-18 14:51:01,936 INFO Creating /tmp/playground/pure-rust/bat/.cargo/config.toml +2023-10-18 14:51:01,936 INFO Creating /tmp/playground/python-cargo/dummy/.cargo/config.toml ``` ### Build the base image (pip + cargo) @@ -588,8 +600,10 @@ RUN dnf -y install \ python38-devel \ gcc \ libffi-devel \ - openssl-devel && \ - cargo rust rust-std-static -y &&\ + openssl-devel \ + cargo \ + rust \ + rust-std-static &&\ dnf clean all ``` @@ -613,6 +627,7 @@ RUN source /tmp/cachi2.env && \ ```shell podman build . \ --volume "$(realpath ./cachi2-output)":/tmp/cachi2-output:Z \ + --volume "$(realpath ./cachi2.env)":/tmp/cachi2.env:Z \ --network none \ --tag dummy ``` \ No newline at end of file