Commit 9f589284 authored by David Spencer's avatar David Spencer

[review] Check commits affect only one SlackBuild.

parent f7eda90a
......@@ -343,11 +343,16 @@ function review_commit
[ ! -f "${REVIEW_GITREPO}"/"$catnam"/"$prgnam"/"$prgnam".info ] \
&& { echo "${CMD}: Error: not found: $1" >&2; exit 1; }
(cd "${REVIEW_GITREPO}"; sbolint -q "$catnamprgnam" || true)
(cd "${REVIEW_GITREPO}"/"$catnam"/"$prgnam"; git add .)
(cd "${REVIEW_GITREPO}"
sbolint -q "$catnamprgnam" || true
git add "$catnamprgnam"
[ -n $(git diff --name-only --cached | grep -v "^${catnamprgnam}/") ] \
&& { echo "${CMD}: Error: multiple SlackBuilds in staging" >&2; exit 1; }
)
. "${REVIEW_GITREPO}"/"$catnam"/"$prgnam"/"$prgnam".info
[ $? != 0 ] && { echo "${CMD}: Error: bad .info"; return 1; }
author="${MAINTAINER} <$(echo "${EMAIL}" | sed -e 's/<//g' -e 's/>//g')>"
if [ -z "$(cd "${REVIEW_GITREPO}"/"$catnam"/"$prgnam"; git log --oneline . | head -1)" ]; then
......@@ -367,6 +372,7 @@ function review_commit
echo "$message" >&2
echo "" >&2
echo "git commit --author '$author' -m '$message'" >&2
return 1
else
(cd "${REVIEW_GITREPO}"; git commit --author "$author" -m "$message")
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment