Skip to content

Commit c245026

Browse files
committed
pkg{bump,commit}: store PV in current directory
Store PV in the current directory rather than /tmp, to make it possible to handle multiple parallel bumps safely. Signed-off-by: Michał Górny <[email protected]>
1 parent def68be commit c245026

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pkgbump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ export PKGBUMPING=${version}
3030
GENTOO_MIRRORS= ebuild "${2}" manifest
3131
[[ ! -f Manifest ]] || git add Manifest
3232
git add "${2}"
33-
echo "${version}" > "${TMPDIR:-/tmp}"/pkgbump-pv
33+
echo "${version}" > .pkgbump-pv
3434
exec "${scriptdir}"/pkgdiff-mg "${1}" "${2}"

pkgcommit

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
args=()
77
msg=
8+
used_bump=
89

910
# check for -m ...
1011
while [[ ${#} -gt 0 ]]; do
@@ -15,7 +16,9 @@ while [[ ${#} -gt 0 ]]; do
1516
continue
1617
;;
1718
--bump)
18-
msg="Bump to $(</tmp/pkgbump-pv)"
19+
[[ -n .pkgbump-pv ]]
20+
used_bump=1
21+
msg="Bump to $(<.pkgbump-pv)"
1922
shift
2023
continue
2124
;;
@@ -34,3 +37,6 @@ if [[ -s ${tmpf} ]]; then
3437
git commit -F "${tmpf}" "${args[@]}"
3538
fi
3639
rm -f "${tmpf}"
40+
if [[ ${used_bump} ]]; then
41+
rm .pkgbump-pv
42+
fi

0 commit comments

Comments
 (0)