You've already forked uutils.github.io
mirror of
https://github.com/uutils/uutils.github.io.git
synced 2026-06-10 16:12:28 -07:00
playground: show the grep build commit and date
The playground version line records the coreutils WASM commit and the site commit, but grep (built as its own standalone WASM module) had no provenance shown. Capture grep's commit/short/date in the workflow and append a UUTILS_GREP_VERSION block to version.js, then render it next to "Built from uutils/coreutils ..." as "grep <short> (<date>)" linking to the uutils/grep commit.
This commit is contained in:
@@ -212,6 +212,19 @@ jobs:
|
||||
else
|
||||
echo 'const WASM_COMMANDS = ["grep"];' > "$commands_js"
|
||||
fi
|
||||
# Record the grep commit used to build its WASM module so the
|
||||
# playground can show it alongside the coreutils build.
|
||||
grep_hash=$(git rev-parse HEAD)
|
||||
grep_short=$(git rev-parse --short HEAD)
|
||||
grep_date=$(git show -s --format=%cI HEAD)
|
||||
{
|
||||
echo "const UUTILS_GREP_VERSION = {"
|
||||
echo " commit: \"${grep_hash}\","
|
||||
echo " short: \"${grep_short}\","
|
||||
echo " date: \"${grep_date}\""
|
||||
echo "};"
|
||||
} >> ../uutils.github.io/static/wasm/version.js
|
||||
echo "grep WASM build: ${grep_short} (${grep_date})"
|
||||
fi
|
||||
|
||||
- name: Run Zola
|
||||
|
||||
Reference in New Issue
Block a user