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

docs: update screencasts to use apply command #2624

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/screencasts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cd .. && rm -rf ./constellation
```

This will:

+ build the container
+ run the expect based scripts
+ copy recordings into the assets folder of our docs
Expand All @@ -39,13 +40,11 @@ There are three different locations were styling is applied:
1. **The prompt** is styled using [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
More explanation and the actual color codes can be found in [Dockerfile](docker/Dockerfile).
2. **Player dimensions** are passed to the [`AsciinemaWidget`](../src/components/AsciinemaWidget/index.js)
when it's [embedded in the docs](../docs/workflows/verify-cli.md#5). Check the `asciinema-player` for a
when it's [embedded in the docs](../docs/workflows/verify-cli.md). Check the `asciinema-player` for a
[full list of options](https://github.com/asciinema/asciinema-player#options).
1. **Everything else** is [styled via CSS](../src/css/custom.css). This includes the option to build a custom
3. **Everything else** is [styled via CSS](../src/css/custom.css). This includes the option to build a custom
[player theme](https://github.com/asciinema/asciinema-player/wiki/Custom-terminal-themes).

###

## GitHub README.md

The GitHub `README.md` doesn't support embedding the JavaScript `asciinema-player`, therefore we generate an
Expand All @@ -57,5 +56,9 @@ The GitHub `README.md` doesn't support embedding the JavaScript `asciinema-playe
pip3 install termtosvg

# Generate SVG. This takes ~10min, since it actually creates a cluster in GCP.
mkdir constellation
./generate-readme-svg.sh
sudo chown -R $USER:$USER ./constellation
cd constellation && constellation iam destroy
cd .. && rm -rf ./constellation
```
20 changes: 10 additions & 10 deletions docs/screencasts/generate-readme-svg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
#

# Create IAM configuration
pushd constellation || exit
constellation config generate gcp
constellation iam create gcp --update-config --projectID constellation-331613 --serviceAccountID constellation-demo --zone europe-west3-b --yes
popd || exit
docker run -it \
-v "${HOME}"/.config/gcloud:/root/.config/gcloud \
-v "$(pwd)"/recordings:/recordings \
-v "$(pwd)"/constellation:/constellation \
screenrecodings /scripts/configure-cluster.expect

docker build -t screenrecodings docker

Expand Down Expand Up @@ -40,9 +41,8 @@ cp readme.svg ../static/img/shell-windowframe.svg
rm readme.svg new_header.cast

# cleanup Constellation
sudo chown -R "$USER":"$USER" ./constellation
pushd constellation || exit
constellation terminate -y
constellation iam destroy -y
rm -rf ./*
popd || exit
docker run -it \
-v "${HOME}"/.config/gcloud:/root/.config/gcloud \
-v "$(pwd)"/recordings:/recordings \
-v "$(pwd)"/constellation:/constellation \
screenrecodings /scripts/terminate-cluster.expect
Loading