Skip to content

Commit a3e9861

Browse files
committed
Add emoji count to status page
1 parent 4067338 commit a3e9861

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/set_status.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,17 @@ STATUS_FILE="${BASE_DIR}/public/status.json"
2727
LASTMOD=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
2828
TECH="NodeJS $(node --version)"
2929
COMMIT=$(git -C "${BASE_DIR}" rev-parse --short HEAD)
30+
EMOJICOUNT=$(cat "${BASE_DIR}/public/emoji.json" | jq '.data | length')
3031

3132
echo "INFO: updating status file ${STATUS_FILE}"
3233

3334
jq \
3435
--arg lastmod "${LASTMOD}" \
3536
--arg tech "${TECH}" \
3637
--arg commit "${COMMIT}" \
38+
--arg emojicount "${EMOJICOUNT}" \
3739
--compact-output \
38-
'.lastmod = $lastmod | .tech = $tech | .commit = $commit' \
40+
'.lastmod = $lastmod | .tech = $tech | .commit = $commit | .emojicount = $emojicount' \
3941
"${STATUS_FILE}" | sponge "${STATUS_FILE}"
4042

4143
echo "INFO: completed at $(date -u +"%Y-%m-%dT%H:%M:%SZ")"

public/status.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"success":true,"message":"OK","tech":"(local)","lastmod":"(local)","commit":"(local)"}
1+
{"success":true,"message":"OK","tech":"(local)","lastmod":"(local)","commit":"(local)","emojicount":0}

0 commit comments

Comments
 (0)