diff --git a/update.sh b/update.sh index 6e6718c..8c78a70 100755 --- a/update.sh +++ b/update.sh @@ -2,15 +2,22 @@ # SPDX-FileCopyrightText: 2022 Maxwell G (@gotmax23) # SPDX-License-Identifier: MIT +# USAGE: After bumping the version in moby-engine.spec and downloading the new +# sources, run this script in moby-engine's distgit repository to update the +# package's virtual Provides. + set -euo pipefail +# Note(gotmax23): I have a separate update.sh script in my $PATH. +# When that exists, this script will run that first. +# You can ignore this. if command -v update.sh && [ "$#" -gt 0 ]; then update.sh "$@" fi fedpkg prep -version="$(rpmspec -q --srpm --qf '%{version}\n' *.spec)" +version="$(rpmspec -D '_sourcedir %(pwd)' -q --srpm --qf '%{version}\n' *.spec)" cat << EOF > provides.spec.inc # Bundled dependencies @@ -28,7 +35,9 @@ EOF grep -v -e '^$' -e '^#' "moby-${version}/vendor.conf" | sort | awk '{print "Provides: bundled(golang("$1")) = "$2}' >> provides.spec.inc +# Note(gotmax23): Ignore this also. My script commits the specfile, +# and then this ammends that commit to add the updated provides.spec.inc. if command -v update.sh && [ "$#" -gt 0 ]; then - git add --update + git add provides.spec.inc git commit --gpg-sign --amend --no-edit fi