Skip to content
Myr

Fail quickly if not in git repository in scripts/version

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by Nico Williams · parent 4732dd8 · Browse files · 1 file+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:scripts/version+3 added-1 removed
1#!/bin/sh2set -eu34cd "$(dirname "$0")"4cd "$(dirname "$0")/../"5test -d .git || exit 167if git describe --tags --match 'jq-*' >/dev/null 2>&1; then8 git describe --tags --match 'jq-*' --dirty | sed 's/^jq-//'9else10 branch=$(git rev-parse --abbrev-ref HEAD)
3 unmodified lines