buildbot_config/worker/prepare_source
Colin Finck 730b11c26d
Update workers to latest BuildBot release.
The directory name has been changed to reflect that.
2019-06-29 11:46:24 +02:00

32 lines
1023 B
Bash
Executable File

#!/bin/bash
# ReactOS BuildBot Build Scripts
# prepare_source - Generate the revision suffix and patch the source if applicable
#
# Parameter $1 (optional) - JIRA Attachment ID of the patch file
source ../../config.inc
# Patch the source if applicable
if [ "$1" != "" ]; then
echo "* Downloading patch."
wget -q --output-document=default.patch "https://jira.reactos.org/secure/attachment/$1/" || exit $?
echo "* Applying patch."
git apply default.patch || exit $?
else
echo "* Skipping patch phase."
fi
# Generate the revision suffix and write it into a file.
REVISION_SUFFIX=`git describe --abbrev=7 --long`
if [ "$1" != "" ]; then
REVISION_SUFFIX+="-patch$1"
fi
echo "* Revision suffix set to $REVISION_SUFFIX"
echo $REVISION_SUFFIX > revision_suffix
# Give detailed information about the latest commit included.
# This is especially useful when building rebased Pull Requests, whose commits can't be easily identified by their hashes.
echo "* Latest commit included in the build:"
git --no-pager show --quiet