Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
9be009c9
Commit
9be009c9
authored
Dec 11, 2008
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add get_version, fix inc_release, inc_subrelease
parent
db6a7c15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
spec
share/eterbuild/functions/spec
+10
-5
No files found.
share/eterbuild/functions/spec
View file @
9be009c9
...
...
@@ -63,20 +63,25 @@ set_release()
# inc 2 release to 3
inc_release
()
{
BASERELEASE
=
$(
get_numrelease
$1
)
set_release
"
$
i
"
$(
get_txtrelease
$1
)$((
$BASERELEASE
+
1
))
local
BASERELEASE
=
$(
get_numrelease
"
$1
"
)
set_release
"
$
1
"
$(
get_txtrelease
"
$1
"
)$((
$BASERELEASE
+
1
))
}
# inc 2.x to 2.(x+1) or 2 to 2.1
inc_subrelease
()
{
BASERELEASE
=
$(
get_numrelease
$1
)
MAJOR
=
`
echo
"
$BASERELEASE
"
|
sed
-e
"s|
\.
.*||"
`
MINOR
=
`
echo
"
$BASERELEASE
"
|
sed
-e
"s|.*
\.
||"
`
local
BASERELEASE
=
$(
get_numrelease
$1
)
local
MAJOR
=
`
echo
"
$BASERELEASE
"
|
sed
-e
"s|
\.
.*||"
`
local
MINOR
=
`
echo
"
$BASERELEASE
"
|
sed
-e
"s|.*
\.
||"
`
[
"
$MINOR
"
=
"
$BASERELEASE
"
]
&&
MINOR
=
"0"
set_release
"
$1
"
"
$(
get_txtrelease
$1
)${
MAJOR
}
.
$((
$MINOR
+
1
))
"
}
get_version
()
{
eval_spec
$1
| get_var
"Version"
}
# Set version for spec (args: spec version), f.i. test.spec 1.2.3)
# Supports %major and %ver_major macros in spec
...
...
Write
Preview
Markdown
is supported
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