echo "handling git for branch: master"
git config --global user.email "sw360-bot@eclipse.org"
git config --global user.name "SW360 Bot"
git add -A
if ! git diff --cached --exit-code; then
echo "Changes have been detected, publishing to repo 'www.eclipse.org/sw360'"
git commit -m "Website build sw360.website.staging-5"
else
echo "No change have been detected since last build, nothing to publish"
fi
git log --graph --abbrev-commit --date=relative -n 5
git push origin HEAD:master ||
echo "failed to push to master"