Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
add changelog info to rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Seto (jseto) committed Apr 12, 2018
1 parent 81b16b3 commit 0d4aede
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dist/make-rpm
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ cd ${TOP_DIR}
cp dist/*.spec rpmbuild/SPECS/
sed -i "s/^[\t ]*Source0:.*/Source0: ${JOB_NAME}.tar.gz/g" rpmbuild/SPECS/*.spec
sed -i "s/^[\t ]*%setup.*/%setup -n ${JOB_NAME}/g" rpmbuild/SPECS/*.spec
if [ ! -z "${GIT}" ]; then
echo "%changelog" >> rpmbuild/SPECS/*.spec
# --date=format:'%a %b %d %Y' not supported by latest git version for centOS
git log --pretty=format:"\$\$\$ %cd %an%n- %s%n%b%n" |
sed -r 's/[0-9]{2}:[0-9]{2}:[0-9]{2} //g' |
sed -r 's/-[0-9]{4} //g' |
sed 's/*/-/g' |
sed 's/\$\$\$/*/g' >> rpmbuild/SPECS/*.spec
fi
rpmbuild --define "_topdir %(pwd)/rpmbuild" -ba rpmbuild/SPECS/*.spec

0 comments on commit 0d4aede

Please sign in to comment.