aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric <[email protected]>2012-10-19 17:49:28 -0500
committerJordan Wilberding <[email protected]>2012-10-24 11:30:00 -0600
commit3556d9bb5db8ee348bd0911fb56e4de302d2fa04 (patch)
tree17ca0668c890c328b0a9e0a1f29810191035c61c
parentbc049b62f3835eeda981bf75bac70862388d7e2b (diff)
downloadrelx-3556d9bb5db8ee348bd0911fb56e4de302d2fa04.tar.gz
relx-3556d9bb5db8ee348bd0911fb56e4de302d2fa04.tar.bz2
relx-3556d9bb5db8ee348bd0911fb56e4de302d2fa04.zip
add the new rebar vsn plugin for semver support to relcool
Signed-off-by: Jordan Wilberding <[email protected]>
-rw-r--r--rebar.config10
-rw-r--r--src/relcool.app.src2
-rw-r--r--src/relcool.app.src.script22
3 files changed, 9 insertions, 25 deletions
diff --git a/rebar.config b/rebar.config
index 799831a..5fe6e92 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,7 +1,11 @@
%% -*- mode: Erlang; fill-column: 80; comment-column: 75; -*-
-{deps, [{neotoma, "",
- {git, "https://github.com/ericbmerritt/neotoma.git", {tag, "1.5.1"}}},
+{deps, [{rebar_vsn_plugin, ".*",
+ {git, "https://github.com/erlware/rebar_vsn_plugin.git",
+ {tag, "master"}}},
+ {neotoma, "",
+ {git, "https://github.com/ericbmerritt/neotoma.git",
+ {tag, "master"}}},
{erlware_commons, ".*",
{git, "https://github.com/erlware/erlware_commons.git",
{branch, "next"}}},
@@ -9,6 +13,8 @@
{git, "https://github.com/jcomellas/getopt.git",
{branch, "master"}}}]}.
+{plugins, [rebar_vsn_plugin]}.
+
{escript_incl_apps,
[getopt, erlware_commons]}.
diff --git a/src/relcool.app.src b/src/relcool.app.src
index 2127043..ac5de34 100644
--- a/src/relcool.app.src
+++ b/src/relcool.app.src
@@ -20,7 +20,7 @@
{application, relcool,
[{description, "Release assembler for Erlang/OTP Releases"},
- {vsn, git},
+ {vsn, "semver"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib, getopt, erlware_commons]}]}.
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}].