Commit 2c93c015 authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin
Browse files

jenkins_continuous_integration.sh: Only commit if a new package was created


Signed-off-by: default avatarDiego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
parent 323accb4
......@@ -229,15 +229,17 @@ fi
# archied on previous execution os this script
prepare
repository="le5-$(getCurrentRepository)"
pkgs=$(getChangedPackages)
nOfPackages=$(echo $pkgs | wc -l)
# FIXME: checkout and pull from a specified branch, not only master
if $COMMIT; then
if $COMMIT && test $nOfPackages -gt 0; then
git checkout master
git pull
fi
repository="le5-$(getCurrentRepository)"
for pkg in $(getChangedPackages); do
for pkg in $pkgs; do
# Generate Package
# TODO: allow user to change minor and major too
echo "Generating package $pkg"
......@@ -256,7 +258,7 @@ for pkg in $(getChangedPackages); do
fi
done
if $COMMIT; then
if $COMMIT && test $nOfPackages -gt 0; then
git commit -s -a -m "New packages generated by Jenkins"
# TODO: push to the branch being used, which is not necessarily master
if ! git push; then
......
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