summaryrefslogtreecommitdiffstats
path: root/third_party/rust/jsparagus/.metrics/populate_not_implemented.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/rust/jsparagus/.metrics/populate_not_implemented.sh
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/jsparagus/.metrics/populate_not_implemented.sh')
-rwxr-xr-xthird_party/rust/jsparagus/.metrics/populate_not_implemented.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/third_party/rust/jsparagus/.metrics/populate_not_implemented.sh b/third_party/rust/jsparagus/.metrics/populate_not_implemented.sh
new file mode 100755
index 0000000000..3a6200133c
--- /dev/null
+++ b/third_party/rust/jsparagus/.metrics/populate_not_implemented.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+set -ue # its like javascript, everything is allowed unless you prevent it.
+
+topdir=$(git rev-parse --show-toplevel)
+
+cd $topdir
+# setup: persist the scripts between commits
+mkdir -p tmp
+cp -r .metrics tmp/
+git checkout master
+git pull origin master
+
+# create the log of commits
+git log --format=oneline --since=2020-01-01 | tac | awk '{print $1}' > tmp/commit-list
+cd tmp/.metrics
+
+# do stuff with the commits
+for commit in $(cat $topdir/tmp/commit-list)
+do
+ git checkout $commit
+ # python script pulls from env variables, export those
+ export total_count=$(find $topdir/rust -iname '*.rs' -type f -exec cat {} + | grep -c -E "(Emit|Parse|ScopeBuild)Error::NotImplemented")
+ export current_commit=$commit
+ python not_implemented_count.py
+ python not_implemented_badge.py
+done
+
+cd $topdir
+git checkout $ci_branch
+
+# replace this file stuff with whatever it is you want to do to get it to the right place in the
+# repo
+mv -f tmp/.metrics/count/not-implemented.json .metrics/count/not-implemented.json
+mv -f tmp/.metrics/badges/not-implemented.json .metrics/badges/not-implemented.json
+
+# Cleanup: Kill the tmp dir
+rm -r tmp
+
+git add .
+git commit -m"Add NotImplemented"