From 16265a0dbd8bacab0a69a39b896b18d4f8afd607 Mon Sep 17 00:00:00 2001 From: sam bacha Date: Mon, 25 Apr 2022 09:42:10 -0700 Subject: [PATCH] Create hash-version.sh --- hash-version.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 hash-version.sh diff --git a/hash-version.sh b/hash-version.sh new file mode 100644 index 0000000..a658f4f --- /dev/null +++ b/hash-version.sh @@ -0,0 +1,3 @@ +#!/bin/sh +HASH_VERSION=$(git rev-parse --short HEAD 2>/dev/null || find * -type f -name '*.go' -print0 | sort -z | xargs -0 sha1sum | sha1sum | sed -r 's/[^\da-f]+//g') +echo $HASH_VERSION