summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rwxr-xr-xversion.erl8
2 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a9c6d6d..b7c3c41 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,14 @@ release: all
mkdir $(INSTDIR)
./makerelease.erl $(INSTDIR)
+dist: release
+ (VER=$$(./version.erl) && \
+ ARCH=$$(uname -m) && \
+ N=catlfish-$${VER}.$${ARCH} && \
+ { ln -s $$(basename $(INSTDIR)) $${N} && \
+ tar chf - $${N} | xz > $${N}.tar.xz; }; \
+ rm $${N})
+
tests:
make -C test tests
diff --git a/version.erl b/version.erl
new file mode 100755
index 0000000..6e3c37e
--- /dev/null
+++ b/version.erl
@@ -0,0 +1,8 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+
+main(_) ->
+ case file:consult("ebin/catlfish.app") of
+ {ok, [{application, catlfish, PropList}]} ->
+ io:format("~s~n", [proplists:get_value(vsn, PropList)])
+ end.