Skip to content
Snippets Groups Projects
Commit ef25c6cf authored by Natanael Copa's avatar Natanael Copa
Browse files

abump: add option -f to set "fixes" in commit message

parent 692a3179
No related branches found
No related tags found
No related merge requests found
...@@ -26,10 +26,16 @@ do_bump() { ...@@ -26,10 +26,16 @@ do_bump() {
fi fi
msg="$section/$pkgname: $upgrade to ${pkgver}${cve}" msg="$section/$pkgname: $upgrade to ${pkgver}${cve}"
if [ -n "$fixes" ]; then
msg="$msg
fixes #${fixes#\#}
"
fi
echo "$msg" echo "$msg"
( . ./APKBUILD; type package | grep -q function ) || die "package() missing" ( . ./APKBUILD; type package | grep -q function ) || die "package() missing"
sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \ sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \
-e "s/^pkgrel=.*/pkgrel=0/" \ -e "s/^pkgrel=.*/pkgrel=0/" \
APKBUILD APKBUILD
...@@ -42,19 +48,21 @@ do_bump() { ...@@ -42,19 +48,21 @@ do_bump() {
usage() { usage() {
echo "$program - utility to bump pkgver in APKBUILDs" echo "$program - utility to bump pkgver in APKBUILDs"
echo "usage: $program [-hR] [-s CVE-1,CVE-2,...]" echo "usage: $program [-hR] [-s CVE-1,CVE-2,...] [-f ISSUE]"
echo "" echo ""
echo " -h show this help" echo " -h show this help"
echo " -R run abuild with -R for recursive building" echo " -R run abuild with -R for recursive building"
echo " -k keep existing packages" echo " -k keep existing packages"
echo " -s security update" echo " -s security update"
echo " -f fixes ISSUE"
exit 0 exit 0
} }
keep= keep=
recursive="-r" recursive="-r"
while getopts "hkRs:" opt; do while getopts "f:hkRs:" opt; do
case $opt in case $opt in
f) fixes="${OPTARG}";;
h) usage;; h) usage;;
k) keep="-k";; k) keep="-k";;
R) recursive="-R";; R) recursive="-R";;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment