Skip to content

Commit

Permalink
Makefile: detect version properly from dirname.
Browse files Browse the repository at this point in the history
Our reproducibile builds use the dirname to get version, but they have
a v in them (the tools/repro-build.sh script gets this right, so I
copied that).

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Aug 19, 2019
1 parent a525427 commit de36145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /usr/bin/make

# Extract version from git, or if we're from a zipfile, use dirname
VERSION=$(shell git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/lightning-\([0-9.rc]*\)$$,\1,p')
VERSION=$(shell git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc]*\)$$,\1,p')

ifeq ($(VERSION),)
$(error "ERROR: git is required for generating version information")
Expand Down

0 comments on commit de36145

Please sign in to comment.