Stamp the Build With Its Version
scripts/stamp.sh in /home/student/repos/storefront writes build/version.json, which the app shows on its /about page. In CI, the version is often empty, the branch is blank, and the time is in the runner's local format.
Fix scripts/stamp.sh so that, run from the repository root, it writes valid JSON to build/version.json (creating build/ if needed) with exactly these keys:
| Key | Value |
|---|---|
version | the output of git describe --tags --always --dirty (works without tags, marks uncommitted changes) |
commit | the full commit hash |
branch | the current branch, or HEAD when the checkout is detached (as in most CI jobs) |
built_at | UTC time as YYYY-MM-DDTHH:MM:SSZ; when SOURCE_DATE_EPOCH is set, use that time instead of now |
About this machine
Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.