Skip to content

Commit 869e90f

Browse files
author
José Valim
committed
Split SOURCE_REF into its own makefile function
1 parent 80633a2 commit 869e90f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ clean:
9494

9595
#==> Release tasks
9696

97+
SOURCE_REF = $(shell head="$$(git rev-parse HEAD)" tag="$$(git tag --points-at $$head | tail -1)" ; echo "$${tag:-$$head}\c")
98+
9799
docs: compile
98100
mkdir -p ebin
99101
rm -rf docs
100102
cp -R -f lib/*/ebin/*.beam ./ebin
101-
bin/elixir ../exdoc/bin/exdoc "Elixir" "$(VERSION)" -m Kernel -u "https://github.com/elixir-lang/elixir" --source-ref "$(shell head="$$(git rev-parse HEAD)" tag="$$(git tag --points-at $$head | tail -1)" ; echo "$${tag:-$$head}\c")"
103+
bin/elixir ../exdoc/bin/exdoc "Elixir" "$(VERSION)" -m Kernel -u "https://github.com/elixir-lang/elixir" --source-ref "$(call SOURCE_REF)"
102104
rm -rf ebin
103105

104106
release_zip: compile

0 commit comments

Comments
 (0)