Skip to content

Commit

Permalink
Merge e3e6219 into 8e4e431
Browse files Browse the repository at this point in the history
  • Loading branch information
gotcha committed Nov 13, 2015
2 parents 8e4e431 + e3e6219 commit 8123c96
Show file tree
Hide file tree
Showing 932 changed files with 6,078 additions and 11,577 deletions.
24 changes: 5 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,25 +148,11 @@ How to update to a newer version of CKEditor

Valid for CKEditor 4

1. Go to http://ckeditor.com/builder
2. Choose preset `Full`
3. Do not modify included plugins.
4. Select skin `Moono color`
5. Click `Add all` link beside `Languages to choose` label
6. Agree with the terms ;-)
7. Download CKEditor
8. Unzip archive
9. Replace all content of `src/collective/ckeditor/_src/ckeditor` directory
with the contents of `ckeditor 4` directory from the archive.
10. Download and install image2 plugin and its dependencies in
`src/collective/ckeditor/_src/ckeditor/plugins` directory.
In June 2014, they are found at:

* http://ckeditor.com/addon/image2
* http://ckeditor.com/addon/widget
* http://ckeditor.com/addon/lineutils
11. Run `bin/copy_ckeditor_code`
12. Test
1. Go to ``dev/build-ckeditor``
2. Issue the following command ``CKEDITOR_VERSION=4.4.8 make build_all``
3. Run ``bin/copy_ckeditor_code``
4. Test
5. Commit

Tests status
------------
Expand Down
2 changes: 2 additions & 0 deletions dev/build-ckeditor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ckeditor-dev
download
22 changes: 22 additions & 0 deletions dev/build-ckeditor/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: checkout build build_all plone moono clean


checkout:
./checkout.sh

build:
./build.sh

plone:
./plone.sh

moono:
./moono.sh

scayt:
./scayt.sh

build_all: checkout scayt plone build moono

clean:
rm -rf ckeditor-dev download
20 changes: 20 additions & 0 deletions dev/build-ckeditor/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
: "${CKEDITOR_VERSION:?"Need to set CKEDITOR_VERSION environment variable"}"

CKEDITOR_BUILDER_DIR="$(pwd)/ckeditor-dev/dev/builder"
CKEDITOR_BUILDER="${CKEDITOR_BUILDER_DIR}/build.sh"
if [ ! -f "${CKEDITOR_BUILDER}" ]; then
echo "builder script ${CKEDITOR_BUILDER} not found"
exit 1
fi
"${CKEDITOR_BUILDER}"

CKEDITOR_SRC_DIR="$(pwd)/../../src/collective/ckeditor/_src"
rm -rf "${CKEDITOR_SRC_DIR}/ckeditor"

CKEDITOR_RELEASE="${CKEDITOR_BUILDER_DIR}/release/ckeditor_${CKEDITOR_VERSION}.tar.gz"
if [ ! -f "${CKEDITOR_RELEASE}" ]; then
echo "ckeditor release ${CKEDITOR_RELEASE} not found"
exit 1
fi
tar -xzf "${CKEDITOR_RELEASE}" -C "${CKEDITOR_SRC_DIR}"
15 changes: 15 additions & 0 deletions dev/build-ckeditor/checkout.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
: "${CKEDITOR_VERSION:?"Need to set CKEDITOR_VERSION environment variable"}"
CKEDITOR_GITHUB_URL="git@github.com:ckeditor/ckeditor-dev.git"
CKEDITOR_DEV_DIR="$(pwd)/ckeditor-dev"
if [ ! -d "${CKEDITOR_DEV_DIR}" ]; then
git clone "${CKEDITOR_GITHUB_URL}"
fi
cd "${CKEDITOR_DEV_DIR}" || exit
if [ ! -d ".git" ]; then
echo "$(pwd) is not a git checkout"
exit 1
fi
git fetch origin
git checkout "${CKEDITOR_VERSION}"
cd ..
36 changes: 36 additions & 0 deletions dev/build-ckeditor/moono.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash
: "${CKEDITOR_VERSION:?"Need to set CKEDITOR_VERSION environment variable"}"
CKEDITOR_SRC_DIR="$(pwd)/../../src/collective/ckeditor/_src"

# make download directory
DOWNLOAD_DIR="$(pwd)/download"
if [ ! -d "${DOWNLOAD_DIR}" ]; then
mkdir "$DOWNLOAD_DIR"
fi

# compute moono color skin version
if [[ ${CKEDITOR_VERSION} == 4.4* ]]; then
MOONO_COLOR_VERSION=1.4.1
fi
if [[ ${CKEDITOR_VERSION} == 4.5* ]]; then
MOONO_COLOR_VERSION=4.5.1
fi
if [ -z ${MOONO_COLOR_VERSION+x} ]; then
echo "version of Monoo color skin could not be computed"
exit 1
fi
MOONO_COLOR_FILE=moonocolor_${MOONO_COLOR_VERSION}.zip
MOONO_COLOR_URL=http://download.ckeditor.com/moonocolor/releases/${MOONO_COLOR_FILE}

function error_exit
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}

echo "Downloading ${MOONO_COLOR_URL}..."
curl -o "${DOWNLOAD_DIR}/${MOONO_COLOR_FILE}" ${MOONO_COLOR_URL} || error_exit "download of Monoo Color failed"
unzip "${DOWNLOAD_DIR}/${MOONO_COLOR_FILE}" -d "${CKEDITOR_SRC_DIR}/ckeditor/skins"
# remove standard skins
rm -rf "${CKEDITOR_SRC_DIR}/ckeditor/skins/moono"
rm -rf "${CKEDITOR_SRC_DIR}/ckeditor/skins/kama"
45 changes: 45 additions & 0 deletions dev/build-ckeditor/plone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
CKEDITOR_DEV_DIR="$(pwd)/ckeditor-dev"
BUILD_CONFIG="${CKEDITOR_DEV_DIR}/dev/builder/build-config.js"

if [ ! -f "${BUILD_CONFIG}" ]; then
echo "build config ${BUILD_CONFIG} not found"
exit 1
fi

if ! grep image "${BUILD_CONFIG}"; then
echo "Build script should be fixed."
echo "Plugin image not found in default build config ${BUILD_CONFIG}."
exit 1
fi

function check_plugin
{
PLUGIN="${1}"
PLUGIN_DIR="${CKEDITOR_DEV_DIR}/plugins/${PLUGIN}"
if [ ! -d "${PLUGIN_DIR}" ]; then
echo "Build script should be fixed."
echo "Plugin ${1} not found at ${PLUGIN_DIR}."
exit 1
fi
if grep "${PLUGIN}" "${BUILD_CONFIG}"; then
echo "Build script should be fixed."
echo "Plugin ${PLUGIN} found in default build config ${BUILD_CONFIG}."
exit 1
fi
}

check_plugin image2
check_plugin widget
check_plugin lineutils
check_plugin wsc
check_plugin scayt

# add image2 plugin in build configuration
# also add widget and lineutils plugins, they are image2 dependencies
# so that it gets included in the distro
sed -i '/image: 1,/aimage2: 1,' "${BUILD_CONFIG}"
sed -i '/image2: 1,/awidget: 1,' "${BUILD_CONFIG}"
sed -i '/widget: 1,/alineutils: 1,' "${BUILD_CONFIG}"
sed -i '/lineutils: 1,/awsc: 1,' "${BUILD_CONFIG}"
sed -i '/wsc: 1,/ascayt: 1,' "${BUILD_CONFIG}"
51 changes: 51 additions & 0 deletions dev/build-ckeditor/scayt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash
: "${CKEDITOR_VERSION:?"Need to set CKEDITOR_VERSION environment variable"}"
PLUGINS_DIR="$(pwd)/ckeditor-dev/plugins"

# make download directory
DOWNLOAD_DIR="$(pwd)/download"
if [ ! -d "${DOWNLOAD_DIR}" ]; then
mkdir "$DOWNLOAD_DIR"
fi

# compute scayt plugin version
if [[ ${CKEDITOR_VERSION} == 4.4* ]]; then
SCAYT_VERSION=4.4.8
fi
if [[ ${CKEDITOR_VERSION} == 4.5* ]]; then
SCAYT_VERSION=4.5.5
fi
if [ -z ${SCAYT_VERSION+x} ]; then
echo "version of scayt plugin could not be computed"
exit 1
fi
SCAYT_FILE=scayt_${SCAYT_VERSION}.zip
SCAYT_URL=http://download.ckeditor.com/scayt/releases/${SCAYT_FILE}

# compute wsc plugin version
if [[ ${CKEDITOR_VERSION} == 4.4* ]]; then
WSC_VERSION=4.4.8
fi
if [[ ${CKEDITOR_VERSION} == 4.5* ]]; then
WSC_VERSION=4.5.5
fi
if [ -z ${WSC_VERSION+x} ]; then
echo "version of wsc plugin could not be computed"
exit 1
fi
WSC_FILE=wsc_${WSC_VERSION}.zip
WSC_URL=http://download.ckeditor.com/wsc/releases/${WSC_FILE}

function error_exit
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit 1
}

echo "Downloading ${SCAYT_URL}..."
curl -o "${DOWNLOAD_DIR}/${SCAYT_FILE}" ${SCAYT_URL} || error_exit "download of scayt failed"
unzip "${DOWNLOAD_DIR}/${SCAYT_FILE}" -d "${PLUGINS_DIR}"

echo "Downloading ${WSC_URL}..."
curl -o "${DOWNLOAD_DIR}/${WSC_FILE}" ${WSC_URL} || error_exit "download of wsc failed"
unzip "${DOWNLOAD_DIR}/${WSC_FILE}" -d "${PLUGINS_DIR}"
3 changes: 3 additions & 0 deletions docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
4.3.0b3 (unreleased)
--------------------

- Update to CKeditor 4.4.8
[gotcha]

- Add some robot tests
[spreverde, gotcha]

Expand Down
Loading

0 comments on commit 8123c96

Please sign in to comment.