tools/change_addon_version: workaround to fix git locks

:# ./tools/change_addon_version
git commit "distro: bump ADDON_VERSION to 12.80.1"
git commit "addons: reset version"
fatal: Unable to create '/mnt/d/LE/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
git commit "addons: bump kodi-binary-addons"
This commit is contained in:
CvH 2024-09-04 20:10:17 +02:00
parent 28ebb1bd37
commit 52184a2a39

View File

@ -21,6 +21,8 @@ update_addon_version() {
echo "git commit \"distro: bump ADDON_VERSION to ${BUMP_ADDON_VERSION}\""
git commit -qs -m "distro: bump ADDON_VERSION to ${BUMP_ADDON_VERSION}" "${DISTRIBUTION_PATH}"
# wait for slow fs otherwise lock errors at git
sync
}
update_package() {
@ -37,6 +39,8 @@ update_package() {
# commit changes
# avoid errors at commit by checking if changes are available
git diff --quiet HEAD $REF -- packages/addons || { echo "git commit \"addons: reset version\"" && git commit -qs -m "addons: reset version" "packages/addons"; }
# wait for slow fs otherwise lock errors at git
sync
}
update_binary_addons() {
@ -50,6 +54,8 @@ update_binary_addons() {
# commit changes
# avoid errors at commit by checking if changes are available
git diff --quiet HEAD $REF -- packages/mediacenter/kodi-binary-addons || { echo "git commit \"addons: bump kodi-binary-addons\"" && git commit -qs -m "addons: bump kodi-binary-addons" "packages/mediacenter/kodi-binary-addons"; }
# wait for slow fs otherwise lock errors at git
sync
}
# check if whiptail is installed and directly execute script when argument is supplied