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
e8abf5c3
Commit
e8abf5c3
authored
Feb 22, 2014
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmlog: add -e option support for just increment and add empty changelog entry
parent
4713d390
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
rpmlog
bin/rpmlog
+16
-3
No files found.
bin/rpmlog
View file @
e8abf5c3
#!/bin/sh
# 2010, 2012 (c) Etersoft http://etersoft.ru
# 2010, 2012
, 2013
(c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Script for update changelog or increment release
...
...
@@ -18,12 +18,15 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echog
" -r increment release"
echog
" -s increment subrelease"
echog
" -l add changelog from git log (since last release tag or TAG)"
echog
" -e increment and add empty changelog entry"
echo
echog
"Ext. options:"
echog
" -t test run (without change files and repo)"
echo
echog
"Example:"
echog
"
$
rpmlog -v -l - typical build new version"
echog
"
$
rpmlog -v -l - typical build new version"
echog
"
$
rpmlog -r -l HEAD~2 - build new version with last two commit message as changelog"
echog
"
$
rpmlog -r -e - prepare new version build with empty changelog entry"
exit
0
fi
...
...
@@ -41,6 +44,12 @@ if [ "$1" = "-l" ] ; then
shift
fi
CHANGELOGADD
=
if
[
"
$1
"
=
"-e"
]
;
then
CHANGELOGADD
=
$1
shift
fi
TESTRUN
=
if
[
"
$1
"
=
"-t"
]
;
then
TESTRUN
=
$1
...
...
@@ -71,7 +80,7 @@ if [ ! -r "$SPECNAME" ] ; then
fatal
"Spec
$SPECNAME
does not found"
fi
[
-n
"
$CHANGELOGUPDATE$TESTRUN
"
]
||
fatal
"Run with -t param for test or with -h for help"
[
-n
"
$CHANGELOG
ADD$CHANGELOG
UPDATE$TESTRUN
"
]
||
fatal
"Run with -t param for test or with -h for help"
if
[
-z
"
$FROMTAG
"
]
;
then
build_rpms_name
$SPECNAME
...
...
@@ -81,10 +90,14 @@ if [ -z "$FROMTAG" ] ; then
# FIXME: if don't exists, use last tag?
fi
if
[
-n
"
$CHANGELOGADD
"
]
;
then
CHANGELOG
=
"- "
else
# TODO: найти параметр для упрощения истории. пока - sort?
# Делает первую букву маленькой, убирает точку в конце строки
CHANGELOG
=
"
`
git log
$FROMTAG
..
$TOTAG
--reverse
--simplify-merges
--dense
--pretty
=
"- %s"
|
sed
-e
"s|
\.\$
||g"
|
sed
-e
"s|-
\(
[A-Z]
\)
|-
\l\1
|g"
|
sed
-e
"s|%||g"
`
"
[
-n
"
$CHANGELOG
"
]
||
fatal
"git log was failed"
fi
if
[
-n
"
$TESTRUN
"
]
;
then
INCREMENTMODE
=
""
...
...
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