Skip to content

Commit

Permalink
[.copr/Makefile] Make git ref computation work with detached HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
msimacek committed Mar 5, 2018
1 parent 3e19e00 commit 460f956
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .copr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ outdir := $(CURDIR)
tmpdir := build
gitdir := $(dir $(spec))/.git

rev := $(shell sed 's/\(.......\).*/\1/' $(gitdir)/$$(sed -n '/^ref:/{s/.* //;p}' $(gitdir)/HEAD))
rev := $(shell ref="$$(cat $(gitdir)/HEAD)"; [[ "$$ref" == "ref: "* ]] && ref="$$(cat "$(gitdir)/$${ref\#ref: }")"; echo "$${ref:0:7}")
date := $(shell date +%Y%m%d.%H%M)

version := $(shell sed -n '/Version:/{s/.* //;p}' $(spec))
Expand Down

0 comments on commit 460f956

Please sign in to comment.