Files
recflare/packages/tools/bin/get-version
T
Devin Zuczek 8e644a5c20 Initial commit
2026-06-08 18:23:40 -04:00

15 lines
341 B
Bash
Executable File

#!/bin/bash
set -eu
# Script to get version for Workers apps
if ! command -v jq >/dev/null; then
echo "ERROR: jq is required for getting the version of the Worker from package.json. Please install jq."
exit 1
fi
pkg_json_version=$(jq -r '.version' package.json)
gitsha=$(git log -1 --pretty=format:%h)
echo "$pkg_json_version-$gitsha"