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
1
Merge Requests
1
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
b4db9cba
Commit
b4db9cba
authored
Feb 08, 2026
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmlog: add docmd, use --no-pager, add reset_release(), improve changelog formatting
parent
626e21fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
rpmlog
bin/rpmlog
+11
-3
No files found.
bin/rpmlog
View file @
b4db9cba
...
@@ -148,7 +148,7 @@ if [ -z "$CHANGELOGADD" ] && is_last_commit_tag ; then
...
@@ -148,7 +148,7 @@ if [ -z "$CHANGELOGADD" ] && is_last_commit_tag ; then
fi
fi
if
[
-n
"
$GITLOG
"
]
;
then
if
[
-n
"
$GITLOG
"
]
;
then
git log
$FROMTAG
..
$TOTAG
--reverse
--no-merges
--pretty
=
"%H %s"
docmd
git log
$FROMTAG
..
$TOTAG
--reverse
--no-merges
--pretty
=
"%H %s"
exit
exit
fi
fi
...
@@ -157,7 +157,7 @@ if [ -n "$CHANGELOGADD" ] ; then
...
@@ -157,7 +157,7 @@ if [ -n "$CHANGELOGADD" ] ; then
else
else
# TODO: найти параметр для упрощения истории. пока - sort?
# TODO: найти параметр для упрощения истории. пока - sort?
# Делает первую букву маленькой, убирает точку в конце строки
# Делает первую букву маленькой, убирает точку в конце строки
CHANGELOG
=
"
`
git log
$FROMTAG
..
$TOTAG
--reverse
--simplify-merges
--dense
--pretty
=
"- %s"
|
sed
-e
"s|
\.\$
||g"
|
sed
-e
"s|-
\(
[A-Z]
\)\(
[a-z]
\)
|-
\l\1\2
|g"
|
sed
-e
"s|%||g"
`
"
CHANGELOG
=
"
$(
git
--no-pager
log
$FROMTAG
..
$TOTAG
--reverse
--simplify-merges
--dense
--pretty
=
"- %s"
|
sed
-e
"s|
\.\$
||g"
-e
"s|-
\(
[A-Z]
\)\(
[a-z]
\)
|-
\l\1\2
|g"
-e
"s|%||g"
-e
"s| +|
\n
+|g"
)
"
[
-n
"
$CHANGELOG
"
]
||
fatal
"git log was failed. Probably, you have no tag
$FROMTAG
in your repo. Check the source repository."
[
-n
"
$CHANGELOG
"
]
||
fatal
"git log was failed. Probably, you have no tag
$FROMTAG
in your repo. Check the source repository."
fi
fi
...
@@ -177,6 +177,14 @@ if [ "$INCREMENTMODE" = "-a" ] ; then
...
@@ -177,6 +177,14 @@ if [ "$INCREMENTMODE" = "-a" ] ; then
fi
fi
fi
fi
# overload func
reset_release
()
{
local
SPECNAME
=
"
$1
"
old
=
"
$(
get_release
$SPECNAME
)
"
echo
"
${
old
/[0-9]/
}
1"
}
# increment release
# increment release
case
"
$INCREMENTMODE
"
in
case
"
$INCREMENTMODE
"
in
"-r"
)
"-r"
)
...
@@ -208,7 +216,7 @@ fi
...
@@ -208,7 +216,7 @@ fi
add_changelog_helper
"
$CHANGELOG
"
$SPECNAME
||
fatal
"add_changelog failed, leave all uncommitted"
add_changelog_helper
"
$CHANGELOG
"
$SPECNAME
||
fatal
"add_changelog failed, leave all uncommitted"
#git_commit_ignore_nothing $SPECNAME -m "new build $NEWREV (with rpmlog script)"
#git_commit_ignore_nothing $SPECNAME -m "new build $NEWREV (with rpmlog script)"
gammit
$QUIET
--spec
=
$SPECNAME
$SPECNAME
docmd
gammit
$QUIET
--spec
=
$SPECNAME
$SPECNAME
RGD
=
$(
get_root_git_dir
)
RGD
=
$(
get_root_git_dir
)
hook
=
$RGD
/.gear/new-build-postcommit-hook
hook
=
$RGD
/.gear/new-build-postcommit-hook
...
...
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