Ports: Use clearer tag names for ./package.sh dev

The old names only made sense in the context of `./package.sh dev` but
that will not be the only context anymore very soon.
This commit is contained in:
Tim Schumacher 2023-09-06 23:46:11 +02:00
parent 9a828a76d2
commit b80760003e
Notes: sideshowbarker 2024-07-16 21:45:42 +09:00

View file

@ -744,7 +744,7 @@ do_dev() {
git config core.autocrlf false
git add --all --force
git commit -a -m 'Initial import'
git tag import
git tag source
fi
if [ -d "${PORT_META_DIR}/patches" ] && [ -n "$(find -L "${PORT_META_DIR}/patches" -maxdepth 1 -name '*.patch' -print -quit)" ]; then
@ -770,7 +770,7 @@ do_dev() {
done
fi
git tag original
git tag patched
popd
}
@ -785,14 +785,14 @@ do_dev() {
launch_user_shell
popd >/dev/null 2>&1
local original_hash="$(git -C "$workdir" rev-parse refs/tags/original)"
local original_hash="$(git -C "$workdir" rev-parse refs/tags/patched)"
local current_hash="$(git -C "$workdir" rev-parse HEAD)"
# If the hashes are the same, we have no changes, otherwise generate patches
if [ "$original_hash" != "$current_hash" ] || [ "${force_patch_regeneration}" = "true" ]; then
>&2 echo "Note: Regenerating patches as there are changed commits in the port repo (started at $original_hash, now is $current_hash)"
rm -fr "${PORT_META_DIR}"/patches/*.patch
git -C "$workdir" format-patch --no-numbered --zero-commit --no-signature --full-index refs/tags/import -o "$(realpath "${PORT_META_DIR}/patches")"
git -C "$workdir" format-patch --no-numbered --zero-commit --no-signature --full-index refs/tags/source -o "$(realpath "${PORT_META_DIR}/patches")"
do_generate_patch_readme
fi
}