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
d38b9f63
Commit
d38b9f63
authored
Apr 19, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbs: force name,version,release for tag
parent
0684f8c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
rpmbs
bin/rpmbs
+17
-5
No files found.
bin/rpmbs
View file @
d38b9f63
...
...
@@ -101,12 +101,24 @@ LISTRPMARGS=$@
}
# Uses: FORCE, BASENAME, VERSION, RELEASE
# Arg: [pipe] args
__gear_create_tag
()
{
local
GEARCTAG
=
gear-create-tag
if
[
"
$1
"
=
"pipe"
]
;
then
shift
$GEARCTAG
$FORCE
-n
"
$VERSION
-
$RELEASE
"
-m
"
$BASENAME
$VERSION
-
$RELEASE
"
"
$@
"
2>&1
else
docmd
$GEARCTAG
$FORCE
-n
"
$VERSION
-
$RELEASE
"
-m
"
$BASENAME
$VERSION
-
$RELEASE
"
"
$@
"
fi
}
# check and create tag according to package release
# used: SPECDIR, LISTNAMES, FORCE
check_gear_and_tag
()
{
local
RESULT
=
0
local
GEARCTAG
=
gear-create-tag
# set SPECDIR from LISTNAMES if empty
[
-n
"
$SPECDIR
"
]
||
set_specdir
$LISTNAMES
...
...
@@ -132,11 +144,11 @@ check_gear_and_tag()
cd
$SPECDIR
>
/dev/null
docmd
$GEARCTAG
$FORCE
||
RESULT
=
1
__gear_create_tag
||
RESULT
=
1
if
[
"
$RESULT
"
=
1
]
;
then
if
$GEARCTAG
$FORCE
2>&1
|
grep
-q
"Too many specfiles found"
;
then
docmd
$GEARCTAG
$FORCE
-r
.gear/
$(
readlink
.gear/rules
)
&&
RESULT
=
0
elif
$GEARCTAG
$FORCE
2>&1
|
grep
-q
"already exists"
;
then
if
__gear_create_tag pipe
|
grep
-q
"Too many specfiles found"
;
then
__gear_create_tag
-r
.gear/
$(
readlink
.gear/rules
)
&&
RESULT
=
0
elif
__gear_create_tag pipe
|
grep
-q
"already exists"
;
then
is_last_commit_tag
||
fatal
"Tag is set NOT on the last commit! Use -f key for override tag"
RESULT
=
1
fi
...
...
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