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
64de7581
You need to sign in or sign up before continuing.
Commit
64de7581
authored
Aug 09, 2018
by
Pavel Vainerman
Committed by
Vitaly Lipatov
Aug 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(rpmlog): added --last-changelog command
parent
aaff4cb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
3 deletions
+39
-3
rpmlog
bin/rpmlog
+14
-3
spec
share/eterbuild/functions/spec
+25
-0
No files found.
bin/rpmlog
View file @
64de7581
...
...
@@ -26,7 +26,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echog
" -q quiet mode (do not ask anything)"
echog
" -n VERSION set version and reset release"
echo
echog
" --last-version show current version of build"
echog
" --last-version show current version of build"
echog
" --last-changelog show changelog the latest build"
echo
echog
"Example:"
echog
"
$
rpmlog -v -l - typical build new version"
...
...
@@ -84,6 +85,12 @@ if [ "$1" = "--last-version" ] ; then
shift
fi
LASTCHANGELOGCMD
=
if
[
"
$1
"
=
"--last-changelog"
]
;
then
LASTCHANGELOGCMD
=
1
shift
fi
if
[
-n
"
${
1
/*.spec/
}
"
]
||
[
-z
"
$1
"
]
;
then
SPECNAME
=
$(
get_gear_spec
)
[
-z
"
$QUIET
"
]
&&
echo
"Using autodetected spec
$SPECNAME
..."
...
...
@@ -108,7 +115,7 @@ if [ ! -r "$SPECNAME" ] ; then
fatal
"Spec
$SPECNAME
does not found"
fi
[
-n
"
$CHANGELOGADD$CHANGELOGUPDATE$TESTRUN$LASTVERCMD
"
]
||
fatal
"Run with -t param for test or with -h for help"
[
-n
"
$CHANGELOGADD$CHANGELOGUPDATE$TESTRUN$LASTVERCMD
$LASTCHANGELOGCMD
"
]
||
fatal
"Run with -t param for test or with -h for help"
if
[
-z
"
$FROMTAG
"
]
;
then
build_rpms_name
$SPECNAME
...
...
@@ -150,9 +157,13 @@ fi
if
[
-n
"
$LASTVERCMD
"
]
;
then
echo
$(
get_version
$SPECNAME
)
-
$(
get_release
$SPECNAME
)
exit
0
exit
$?
fi
if
[
-n
"
$LASTCHANGELOGCMD
"
]
;
then
get_last_changelog
$SPECNAME
exit
$?
fi
# increment release
case
"
$INCREMENTMODE
"
in
...
...
share/eterbuild/functions/spec
View file @
64de7581
...
...
@@ -359,3 +359,28 @@ remove_bashism()
rm
-f
$SPECNAME
.main
$SPECNAME
.changelog
}
get_last_changelog
()
{
local
SPEC
=
"
$1
"
local
beg
=
local
wait_end
=
while
read
line
;
do
if
echo
$line
|
grep
-q
'%changelog'
;
then
beg
=
1
continue
fi
[
-z
"
$beg
"
]
&&
continue
# check end of changelog (skip last changelog line)
if
echo
"
$line
"
|
grep
'*'
|
grep
-E
'[<>]+'
|
grep
-q
-E
"[0-9.]+.[0-9]+"
;
then
[
-n
"
$wait_end
"
]
&&
return
wait_end
=
1
fi
echo
"
$line
"
done
<
$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