Commit 7511164c authored by Xavier Perseguers's avatar Xavier Perseguers
Browse files

[!!!][TASK] Support multiple branches of TYPO3 sources

Change-Id: Ic44f29e83e5d9386def0cf570e86f1b098c79990
Reviewed-on: http://review.typo3.org/41121

Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
parent 0392c1b9
......@@ -69,42 +69,52 @@ function update_typo3_typo3_core_projects() {
function git_typo3_typo3_core_pull() {
echo
echo "TYPO3 Core GIT Pull"
echo "TYPO3 Core GIT Pull from $1"
cd $GIT_DIRECTORY
git checkout master
git reset --hard origin/master
git fetch
git checkout $1
git pull
git submodule init
git submodule update
}
# GIT pull
git_typo3_typo3_core_pull
# Check project language configuration
check_typo3_typo3_core_projects_languages
echo
echo "Update templates projects ..."
for FILE in $(find $GIT_DIRECTORY/ -name *.xlf | grep sysext); do
RELATIVE_FILE_PATH=$(echo $FILE | sed s#$GIT_DIRECTORY/## | cut -d/ -f4-)
PROJECT=$(echo TYPO3.TYPO3.core.$(echo $FILE | sed s#$GIT_DIRECTORY/## | cut -d/ -f3))
echo "$PROJECT/$RELATIVE_FILE_PATH"
# Check project configuration
project_exist $PROJECT || exit 0
# Update project templates
if [ $? = 0 ]; then
# Check if directory exist
RELATIVE_FILE_DIRECTORY=$(dirname $PO_DIRECTORY/$PROJECT/templates/$RELATIVE_FILE_PATH);
if [ ! -d $RELATIVE_FILE_DIRECTORY ]; then
echo "Create directory: $RELATIVE_FILE_DIRECTORY"
mkdir -p $RELATIVE_FILE_DIRECTORY
fi
# We successively fetch from old to newer branches to get back files which
# may have been moved around. BEWARE: labels should not get deleted (well,
# possible if file is moved as well) and "templates" language MUST be
# manually updated (in GUI) to discover new files before they are mirrored
# to other locales
#for BRANCH in 'TYPO3_4-5' 'TYPO3_6-2'; do
for BRANCH in 'TYPO3_6-2'; do
# GIT pull
git_typo3_typo3_core_pull $BRANCH
# Deploy file from GIT
sanitize_template_file $FILE > \
$PO_DIRECTORY/$PROJECT/templates/$RELATIVE_FILE_PATH
fi
# Check project language configuration
check_typo3_typo3_core_projects_languages
echo
echo "Update templates projects ..."
for FILE in $(find $GIT_DIRECTORY/ -name *.xlf | grep sysext); do
RELATIVE_FILE_PATH=$(echo $FILE | sed s#$GIT_DIRECTORY/## | cut -d/ -f4-)
PROJECT=$(echo TYPO3.TYPO3.core.$(echo $FILE | sed s#$GIT_DIRECTORY/## | cut -d/ -f3))
echo "$PROJECT/$RELATIVE_FILE_PATH"
# Check project configuration
project_exist $PROJECT || exit 0
# Update project templates
if [ $? = 0 ]; then
# Check if directory exist
RELATIVE_FILE_DIRECTORY=$(dirname $PO_DIRECTORY/$PROJECT/templates/$RELATIVE_FILE_PATH);
if [ ! -d $RELATIVE_FILE_DIRECTORY ]; then
echo "Create directory: $RELATIVE_FILE_DIRECTORY"
mkdir -p $RELATIVE_FILE_DIRECTORY
fi
# Deploy file from GIT
sanitize_template_file $FILE > \
$PO_DIRECTORY/$PROJECT/templates/$RELATIVE_FILE_PATH
fi
done
done
# Update all core project
......
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