1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-26 11:17:49 +02:00

Rename exercise template directory and archive.

This commit is contained in:
Andrew Walbran 2023-04-05 16:15:42 +01:00
parent ed4f5b64c4
commit 86d8c4ae54
6 changed files with 17 additions and 10 deletions

View File

@ -133,7 +133,7 @@ jobs:
run: mdbook build run: mdbook build
- name: Zip exercise templates for ${{ matrix.language }} translation - name: Zip exercise templates for ${{ matrix.language }} translation
run: cd book/exerciser && zip --recurse-paths ../html/exercises.zip exercise-templates/ run: cd book/exerciser && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/
- name: Upload ${{ matrix.language }} translation - name: Upload ${{ matrix.language }} translation
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@ -41,7 +41,7 @@ jobs:
run: mdbook build -d book run: mdbook build -d book
- name: Zip exercise templates - name: Zip exercise templates
run: cd book/exerciser && zip --recurse-paths ../html/exercises.zip exercise-templates/ run: cd book/exerciser && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/
- name: Build all translations - name: Build all translations
run: | run: |
@ -50,7 +50,7 @@ jobs:
MDBOOK_BOOK__LANGUAGE=$po_lang \ MDBOOK_BOOK__LANGUAGE=$po_lang \
MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$po_lang/ \ MDBOOK_OUTPUT__HTML__SITE_URL=/comprehensive-rust/$po_lang/ \
mdbook build -d book/$po_lang mdbook build -d book/$po_lang
(cd book/$po_lang/exerciser && zip --recurse-paths ../html/exercises.zip exercise-templates/) (cd book/$po_lang/exerciser && zip --recurse-paths ../html/comprehensive-rust-exercises.zip comprehensive-rust-exercises/)
mv book/$po_lang/html book/html/$po_lang mv book/$po_lang/html book/html/$po_lang
echo "::endgroup::" echo "::endgroup::"
done done

View File

@ -50,4 +50,4 @@ editable = true
"generics/trait-bounds.html" = "traits/trait-bounds.html" "generics/trait-bounds.html" = "traits/trait-bounds.html"
[output.exerciser] [output.exerciser]
output-directory = "exercise-templates" output-directory = "comprehensive-rust-exercises"

View File

@ -15,5 +15,12 @@ fn some_more_code() {
``` ```
```` ````
It will create a file `book/exerciser/exercise-templates/example/src/main.rs` with the appropriate and mdbook configuration in `book.toml` like:
contents.
```toml
[output.exerciser]
output-directory = "comprehensive-rust-exercises"
```
It will create a file `book/exerciser/comprehensive-rust-exercises/example/src/main.rs` with the
appropriate contents.

View File

@ -20,8 +20,8 @@ Hints:
[nRF52833 datasheet](https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) if you want, but [nRF52833 datasheet](https://infocenter.nordicsemi.com/pdf/nRF52833_PS_v1.5.pdf) if you want, but
it shouldn't be necessary for this exercise. it shouldn't be necessary for this exercise.
Download the [exercise template](../../exercises.zip) and look in the `compass` directory for the Download the [exercise template](../../comprehensive-rust-exercises.zip) and look in the `compass`
following files. directory for the following files.
`src/main.rs`: `src/main.rs`:

View File

@ -4,8 +4,8 @@ The QEMU aarch64 virt machine has a [PL031][1] real-time clock at 0x9010000. For
should write a driver for it and use it to print the current time to the serial console. You can use should write a driver for it and use it to print the current time to the serial console. You can use
the [`chrono`][2] crate for date/time formatting. the [`chrono`][2] crate for date/time formatting.
Download the [exercise template](../../exercises.zip) and look in the `rtc` directory for the Download the [exercise template](../../comprehensive-rust-exercises.zip) and look in the `rtc`
following files. directory for the following files.
`src/main.rs`: `src/main.rs`: