Skip to content

Commit 4c3eae4

Browse files
Rory-Ztigercl
authored andcommitted
chore: update app.src.script and rebar.config.script
1 parent ed2717a commit 4c3eae4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

rebar.config.script

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ Tags = case VTags of
3232

3333
LatestTag = lists:last(lists:sort(SortFun, Tags)),
3434

35-
Branch = os:cmd("git branch | grep -e '^*' | cut -d' ' -f 2") -- "\n",
35+
Branch = case os:getenv("GITHUB_RUN_ID") of
36+
false -> os:cmd("git branch | grep -e '^*' | cut -d' ' -f 2") -- "\n";
37+
_ -> re:replace(os:getenv("GITHUB_REF"), "^refs/heads/|^refs/tags/", "", [global, {return ,list}])
38+
end,
3639

3740
GitDescribe = case re:run(Branch, "master|^dev/|^hotfix/", [{capture, none}]) of
3841
match -> {branch, Branch};

src/emqx_coap.app.src.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RemoveLeadingV =
55
fun(Tag) ->
66
case re:run(Tag, "^[v|e]?[0-9]\.[0-9]\.([0-9]|(rc|beta|alpha)\.[0-9])", [{capture, none}]) of
77
nomatch ->
8-
Tag;
8+
re:replace(Tag, "/", "-", [{return ,list}]);
99
_ ->
1010
%% if it is a version number prefixed by 'v' or 'e', then remove it
1111
re:replace(Tag, "[v|e]", "", [{return ,list}])

0 commit comments

Comments
 (0)