From 3556d9bb5db8ee348bd0911fb56e4de302d2fa04 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 19 Oct 2012 17:49:28 -0500 Subject: add the new rebar vsn plugin for semver support to relcool Signed-off-by: Jordan Wilberding --- src/relcool.app.src.script | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/relcool.app.src.script (limited to 'src/relcool.app.src.script') diff --git a/src/relcool.app.src.script b/src/relcool.app.src.script deleted file mode 100644 index 381e7dc..0000000 --- a/src/relcool.app.src.script +++ /dev/null @@ -1,22 +0,0 @@ -%% -*- mode: Erlang; erlang-indent-level: 4; indent-tabs-mode: nil; fill-column: 80 -*- - -[{application, AppName, Details0}] = CONFIG, - -%% Get the tag timestamp and minimal ref from the system. The -%% timestamp is really important from an ordering perspective. -{ok, RawRef} = rebar_utils:sh("git log -n 1 --pretty=format:'%ct.%h\n' .", []), -{ok, RawTag} = rebar_utils:sh("git describe --always --abbrev=0 --tags " - "`git log -n 1 --pretty=format:%h .`", []), - -%% Cleanup the tag and the Ref information. Basically leading 'v's and -%% whitespace needs to go away. -Tag = re:replace(RawTag, "(^v)|\\s", "", [global]), -Ref = re:replace(RawRef, "\\s", "", [global]), - -%% Create the valid [semver](http://semver.org) version from the tag -Vsn = erlang:binary_to_list(erlang:iolist_to_binary([Tag, "+build.", Ref])), - -%% Replace the old version with the new one -Details1 = lists:keyreplace(vsn, 1, Details0, {vsn, Vsn}), - -[{application, AppName, Details1}]. -- cgit v1.2.3