File: export-metrics.sh

package info (click to toggle)
liquidsoap 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,844 kB
  • sloc: ml: 74,136; javascript: 27,320; ansic: 505; sh: 139; xml: 114; lisp: 96; makefile: 26
file content (17 lines) | stat: -rwxr-xr-x 401 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

BRANCH=$1
METRICS_DIR=$2
TIME="$(date +%s)"
METRICS_FILE="${METRICS_DIR}/${TIME}.yaml"

git config --global --add safe.directory '*'
cd /tmp/liquidsoap-full/liquidsoap || exit 1
mkdir -p "${METRICS_DIR}"
touch /tmp/metrics.yaml
cat /tmp/metrics.yaml > "${METRICS_FILE}"
{
  echo "- commit: $(git rev-parse HEAD)"
  echo "  branch: ${BRANCH}"
  echo "  time: ${TIME}"
} >> "${METRICS_FILE}"