!49 hack:modify gen-version script and add changelog automatically

From: @DCCooper
Reviewed-by: @jingxiaolu
Signed-off-by: @jingxiaolu
This commit is contained in:
openeuler-ci-bot 2020-12-11 15:03:24 +08:00 committed by Gitee
commit 07e05fa10b
4 changed files with 17 additions and 4 deletions

View File

@ -1 +1 @@
0.9.4-13
0.9.4-14

View File

@ -66,16 +66,23 @@ case ${input} in
;;
esac
author=$(git config user.name)
email=$(git config user.email)
# VERSION format:
# Major.Minor.Revision
new_version=${major_old_version}.${minor_old_version}.${revision_old_version}
new_release="${new_release_num}"
new_all=${new_version}-${new_release_num}
new_changelog=$(cat << EOF
* $(date '+%a %b %d %Y') $author <$email> - $new_all\n- Type:\n- CVE:\n- SUG:\n- DESC:\n
EOF
)
# Replace version and release for spec and VERSION files
sed -i -e "s/^Version: .*$/Version: ${new_version}/g" "${spec_file}"
sed -i -e "s/^Release: .*$/Release: ${new_release}/g" "${spec_file}"
sed -i -e "/\%changelog/a$new_changelog" "${spec_file}"
echo "${new_all}" > "${version_file}"
if [[ "${old_all}" != "${new_all}" ]]; then

View File

@ -1 +1 @@
a7020e9811168d5cebb809294adb6445ba134753
5304a15d147e95e6add30b8871eb40f457399ec1

View File

@ -2,7 +2,7 @@
Name: isula-build
Version: 0.9.4
Release: 13
Release: 14
Summary: A tool to build container images
License: Mulan PSL V2
URL: https://gitee.com/openeuler/isula-build
@ -85,7 +85,13 @@ fi
/usr/share/bash-completion/completions/isula-build
%changelog
* Fri Dec 11 2020 lujingxiao <lujingxiao@huawei.com> - 0.9.4-12
* Fri Dec 11 2020 lixiang <lixiang172@huawei.com> - 0.9.4-14
- Type:enhancement
- CVE:NA
- SUG:restart
- DESC:Modify gen-version script and add changelog automatically
* Fri Dec 11 2020 lujingxiao <lujingxiao@huawei.com> - 0.9.4-13
- Change default umask of isula-builder process
* Tue Dec 08 2020 caihaomin<caihaomin@huawei.com> - 0.9.4-12