Setting environment variable from script command for later use in cache name

In the docs, there’s this info:

The environment variable variableName (supports any environment variable exported by CircleCI or added to a specific Context—not any arbitrary environment variable).

However, all is not lost; you can use a file instead. In your version capture:

echo $CYPRESS_VERSION > /tmp/cypress-version

Then in your restore keys:

- cy-{{ checksum "/tmp/cypress-version" }}
2 Likes