Update sync-upstream.sh.
- Add support for production vs. development. - Add support for descriptive branch names. - Fix error message to be more accurate if you ctrl^c out of build.
This commit is contained in:
parent
99a6d4df1b
commit
e5c3314947
@ -17,6 +17,24 @@
|
|||||||
# the output of the script) then manual intervention is required to
|
# the output of the script) then manual intervention is required to
|
||||||
# complete the sync. This will typically happen when a patch fails
|
# complete the sync. This will typically happen when a patch fails
|
||||||
# to apply on the new sources.
|
# to apply on the new sources.
|
||||||
|
#
|
||||||
|
# Development branch:
|
||||||
|
#
|
||||||
|
# * As long as the branch is "master" the repository is treated as
|
||||||
|
# development and synchronization updates are fully automatic.
|
||||||
|
#
|
||||||
|
# Stable branches:
|
||||||
|
#
|
||||||
|
# * Once you branch to a stable Fedora release adjust branch.
|
||||||
|
# e.g. release/2.23/master
|
||||||
|
#
|
||||||
|
# * Set branch_name to the name of the relase
|
||||||
|
# e.g. 2.23
|
||||||
|
#
|
||||||
|
# * The sync script will automatically stop before commit, push, build
|
||||||
|
# for production branches, so you have to review the results and then
|
||||||
|
# do those steps yourself.
|
||||||
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -83,6 +101,15 @@ function prep_failed {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function build_failed {
|
||||||
|
# fedpkg build failed.
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "+ Building the package failed (or was interrupted)."
|
||||||
|
echo "+ Check the koji logs for final status."
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
echo "+ Testing if fedpkg prep works."
|
echo "+ Testing if fedpkg prep works."
|
||||||
tmpfile=$(mktemp fedpkg-prep.out-XXXX)
|
tmpfile=$(mktemp fedpkg-prep.out-XXXX)
|
||||||
|
|
||||||
@ -96,6 +123,7 @@ fedpkg new-sources "$srcdir.tar.gz"
|
|||||||
if [ $branch == "master" ]; then
|
if [ $branch == "master" ]; then
|
||||||
git commit -a -m "Auto-sync with upstream $branch."
|
git commit -a -m "Auto-sync with upstream $branch."
|
||||||
fedpkg push
|
fedpkg push
|
||||||
|
trap build_failed EXIT
|
||||||
fedpkg build
|
fedpkg build
|
||||||
echo "+ Done!"
|
echo "+ Done!"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user