File tree Expand file tree Collapse file tree 1 file changed +38
-1
lines changed
Expand file tree Collapse file tree 1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change 44# we support with the golang cross-compiler.
55#
66# Copyright (c) 2016 Company 0, LLC.
7- # Copyright (c) 2019 Lightning Labs
87# Use of this source code is governed by the ISC
98# license.
109
10+ # Exit on errors.
11+ set -e
12+
1113# If no tag specified, use date + version otherwise use tag.
1214if [[ $1 x = x ]]; then
1315 DATE=` date +%Y%m%d`
1416 VERSION=" 01"
1517 TAG=$DATE -$VERSION
1618else
1719 TAG=$1
20+
21+ # If a tag is specified, ensure that that tag is present and checked out.
22+ if [[ $TAG != $( git describe) ]]; then
23+ echo " tag $TAG not checked out"
24+ exit 1
25+ fi
26+
27+ # Verify that it is signed.
28+ if ! git verify-tag $TAG ; then
29+ echo " tag $TAG not signed"
30+ exit 1
31+ fi
32+
33+ # Build loop to extract version.
34+ make
35+
36+ # Extract version command output.
37+ LOOP_VERSION_OUTPUT=` ./loopd-debug --version`
38+
39+ # Use a regex to isolate the version string.
40+ LOOP_VERSION_REGEX=" version (.+) "
41+ if [[ $LOOP_VERSION_OUTPUT =~ $LOOP_VERSION_REGEX ]]; then
42+ # Prepend 'v' to match git tag naming scheme.
43+ LOOP_VERSION=" v${BASH_REMATCH[1]} "
44+ echo " version: $LOOP_VERSION "
45+
46+ # Match git tag with loop version.
47+ if [[ $TAG != $LOOP_VERSION ]]; then
48+ echo " loop version $LOOP_VERSION does not match tag $TAG "
49+ exit 1
50+ fi
51+ else
52+ echo " malformed loop version output"
53+ exit 1
54+ fi
1855fi
1956
2057go mod vendor
You can’t perform that action at this time.
0 commit comments