aboutsummaryrefslogtreecommitdiff
path: root/dev/lib/handlebars/scripts/update_upstream_git_hash.sh
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-04 18:45:57 +0900
committerDarius Jahandarie <djahandarie@gmail.com>2023-11-04 18:45:57 +0900
commitef79eab44bfd000792c610b968b5ceefd41e76a0 (patch)
tree48b04f30f6248caedbd880801aa49402a9e8066a /dev/lib/handlebars/scripts/update_upstream_git_hash.sh
parent376151096431d4362e4baaacf0cef4a534e169f7 (diff)
Modernize codebase
- Use ES modules - Remove vendored libs and build them from npm using esbuild - Switch from JSZip to zip.js
Diffstat (limited to 'dev/lib/handlebars/scripts/update_upstream_git_hash.sh')
-rwxr-xr-xdev/lib/handlebars/scripts/update_upstream_git_hash.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/dev/lib/handlebars/scripts/update_upstream_git_hash.sh b/dev/lib/handlebars/scripts/update_upstream_git_hash.sh
new file mode 100755
index 00000000..52cc39e0
--- /dev/null
+++ b/dev/lib/handlebars/scripts/update_upstream_git_hash.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+
+TMP=.tmp-handlebars
+HASH_FILE=packages/kbn-handlebars/src/spec/.upstream_git_hash
+
+function cleanup {
+ rm -fr $TMP
+}
+
+trap cleanup EXIT
+
+rm -fr $TMP
+mkdir $TMP
+
+echo "Cloning handlebars repo..."
+git clone -q --depth 1 https://github.com/handlebars-lang/handlebars.js.git -b 4.x $TMP
+
+echo "Updating hash file..."
+git -C $TMP rev-parse HEAD | tr -d '\n' > $HASH_FILE
+git add $HASH_FILE
+
+echo "Done! - Don't forget to commit any changes to $HASH_FILE"