Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
f70b20e4
Verified
Commit
f70b20e4
authored
Nov 24, 2018
by
href
Browse files
version string: force git abbrev size to 8 chars
Fixes #389 Older git versions defaults to 7 chars.
parent
675653ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
mix.exs
View file @
f70b20e4
...
...
@@ -95,7 +95,7 @@ defp version(version) do
{
git_tag
,
git_pre_release
}
=
with
{
tag
,
0
}
<-
System
.
cmd
(
"git"
,
[
"describe"
,
"--tags"
,
"--abbrev=0"
]),
tag
=
String
.
trim
(
tag
),
{
describe
,
0
}
<-
System
.
cmd
(
"git"
,
[
"describe"
,
"--tags"
]),
{
describe
,
0
}
<-
System
.
cmd
(
"git"
,
[
"describe"
,
"--tags"
,
"--abbrev=8"
]),
describe
=
String
.
trim
(
describe
),
ahead
<-
String
.
replace
(
describe
,
tag
,
""
)
do
{
String
.
replace_prefix
(
tag
,
"v"
,
""
),
if
(
ahead
!=
""
,
do
:
String
.
trim
(
ahead
))}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment