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
b2ecd0b1
Commit
b2ecd0b1
authored
Mar 29, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgs: stop update version with macro except ver_major and major
parent
7e73e195
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
rpmgs
bin/rpmgs
+7
-1
spec
share/eterbuild/functions/spec
+6
-0
No files found.
bin/rpmgs
View file @
b2ecd0b1
...
...
@@ -805,8 +805,14 @@ fi
# Set version if needed
if
[
-n
"
$GSSETVERSION
"
]
&&
[
"
$GSSETVERSION
"
!=
"HEAD"
]
;
then
CURVER
=
$(
get_version
$spec
)
set_version
$spec
${
GSSETVERSION
/-*/
}
if
[
"
$CURVER
"
!=
"
$GSSETVERSION
"
]
;
then
CURRAWVER
=
$(
get_raw_version
$spec
)
if
echo
"
$CURRAWVER
"
|
grep
-q
"%"
&&
echo
"
$CURRAWVER
"
|
grep
-v
-E
"^(%ver_major|%major)$"
;
then
fatal
"Can't override macros in Version field, check it manually. Only %ver_major and %major is supported"
fi
set_version
$spec
${
GSSETVERSION
/-*/
}
set_release
$spec
$GSSETRELEASE
if
[
-n
"
$GSSETRELEASE
"
]
;
then
echo
"Set new
$GSSETVERSION
-
$GSSETRELEASE
version for
$spec
"
...
...
share/eterbuild/functions/spec
View file @
b2ecd0b1
...
...
@@ -171,6 +171,11 @@ get_version()
eval_spec
$1
| get_var
"Version"
}
get_raw_version
()
{
cat
$1
| get_var
"Version"
}
# Args: specname, source_number
get_tarballname
()
{
...
...
@@ -203,6 +208,7 @@ set_version()
VERMAJOR
=
fi
# supports ver_major or major
MAJORMACROS
=
`
grep
"%define[[:space:]]
\(\|
ver_
\)
major[[:space:]]"
$SPEC
|
sed
-e
"s|.*[[:space:]]
\(
.*major
\)
.*|
\1
|"
`
if
[
-n
"
${
MAJORMACROS
}
"
]
;
then
# Change major define
...
...
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