Skip to content

Commit

Permalink
Merge tag '4.15.1' into demo
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Nov 9, 2020
2 parents 5b8da18 + 5c0b0b1 commit e15f2c6
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 46 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update CKEditor 4 submodule

on:
schedule:
- cron: "0 0,10,16 * * *"

jobs:
update:
runs-on: ubuntu-latest

strategy:
matrix:
branch: [master, major]

steps:
- name: Fetch changes
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}

- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Bump "ckeditor" submodule
run: |
cd ckeditor
git fetch --all
git checkout ${{ matrix.branch }}
cd ..
if [[ $(git diff origin/${{ matrix.branch }} | wc -c) -ne 0 ]]; then
git config --local user.email "[email protected]"
git config --local user.name "CKEditor Bot"
git add ckeditor
git commit -m "Update CKEditor 4 submodule HEAD."
fi
- name: Push changes
# https://github.com/marketplace/actions/github-push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ matrix.branch }}
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "ckeditor"]
path = ckeditor
url = https://github.com/ckeditor/ckeditor4.git
[submodule "plugins/wsc"]
path = plugins/wsc
url = https://github.com/WebSpellChecker/ckeditor-plugin-wsc.git
[submodule "plugins/scayt"]
path = plugins/scayt
url = https://github.com/WebSpellChecker/ckeditor-plugin-scayt.git
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
62 changes: 34 additions & 28 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,36 @@

# Build CKEditor using the default settings (and build.js)

# Move to the script directory.
cd $(dirname $0)

# Install NPM deps and move external plugins from `node_modules` to `plugins` directory.
echo ""
echo "Installing NPM dependencies..."
if [ "$1" != "-v" ]; then
echo ""
echo "Installing NPM dependencies..."

npm i
npm i

echo ""
echo "Copying plugins from NPM directory..."
echo ""
if [[ ! -d "plugins" ]]; then
echo "Creating plugins directory..."
mkdir "plugins"
fi

cp -r "node_modules/ckeditor4-plugin-exportpdf" "plugins/exportpdf"
echo ""
echo "Copying plugins from NPM directory..."
echo ""

# Move to the script directory.
cd $(dirname $0)
cp -r "node_modules/ckeditor4-plugin-exportpdf" "plugins/exportpdf"
cp -r "node_modules/ckeditor-plugin-scayt" "plugins/scayt"
cp -r "node_modules/ckeditor-plugin-wsc" "plugins/wsc"
fi

# Use the ckeditor4 commit hash as the revision.
cd ckeditor/
rev=`git rev-parse --verify --short HEAD`
CKEDITOR_VERSION=`node -pe "require('./package.json').version"`
rev=$(git rev-parse --verify --short HEAD)
CKEDITOR_VERSION=$(node -pe "require('./package.json').version")
cd ..

CKBUILDER_VERSION="2.3.2"
CKBUILDER_URL="https://download.cksource.com/CKBuilder/$CKBUILDER_VERSION/ckbuilder.jar"

MATHJAX_LIB_PATH="../mathjax/2.2"

versionFolder="${CKEDITOR_VERSION// /-}"

if [ "$1" == "-v" ]
Expand All @@ -40,6 +44,18 @@ fi

set -e

# Variables
CKBUILDER_VERSION="2.3.2"
CKBUILDER_URL="https://download.cksource.com/CKBuilder/$CKBUILDER_VERSION/ckbuilder.jar"
MATHJAX_LIB_PATH="../mathjax/2.2"

MSG_UPDATE_FAILED="Warning: The attempt to update ckbuilder.jar failed. The existing file will be used."
MSG_DOWNLOAD_FAILED="It was not possible to download ckbuilder.jar"

PROGNAME=$(basename "$0")
ARGS=" $@ "
JAVA_ARGS=${ARGS// -t / } # Remove -t from args

echo "CKEditor Presets Builder"
echo "========================"

Expand Down Expand Up @@ -75,11 +91,6 @@ then
target="$target-all"
fi

PROGNAME=$(basename $0)
MSG_UPDATE_FAILED="Warning: The attempt to update ckbuilder.jar failed. The existing file will be used."
MSG_DOWNLOAD_FAILED="It was not possible to download ckbuilder.jar"
ARGS=" $@ "

function error_exit
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
Expand Down Expand Up @@ -115,18 +126,14 @@ echo ""
echo "Copying extra plugins..."
cp -r plugins/* ckeditor/plugins/


echo ""
echo "Deleting $target..."
rm -rf $target


# Run the builder.
echo ""
echo "Building the '$1' preset..."

JAVA_ARGS=${ARGS// -t / } # Remove -t from arrgs

java -jar ckbuilder/$CKBUILDER_VERSION/ckbuilder.jar --build ckeditor $target $skip --version="$CKEDITOR_VERSION ($name)" --revision $rev --build-config presets/$1-build-config.js --no-zip --no-tar --overwrite $JAVA_ARGS

if [ -f "presets/$1-contents.css" ]; then
Expand All @@ -135,7 +142,6 @@ fi
cp presets/$1-ckeditor-config.js $target/ckeditor/config.js
cp presets/README.md $target/ckeditor/


echo "Removing added plugins..."
cd ckeditor
git clean -d -f -f
Expand All @@ -158,7 +164,7 @@ if [[ "$ARGS" == *\ \-t\ * ]]; then
dir=${dir%*/}
dir=${dir##*/}

if [ -d "plugins/$dir/tests" ]; then
if [ -d "plugins/$dir/tests" ] && [ -d "$target/ckeditor/plugins/$dir" ]; then
cp -r "plugins/$dir/tests" "$target/ckeditor/plugins/$dir/tests"
echo " $dir"
fi
Expand Down Expand Up @@ -186,7 +192,7 @@ fi
echo ""
echo "Cleaning plugins directory from NPM artifacts..."

rm -rf "plugins/exportpdf"
rm -rf "plugins"

echo ""
echo "Build created into the \"build\" directory."
Expand Down
2 changes: 1 addition & 1 deletion ckeditor
Submodule ckeditor updated 53 files
+1 −0 .nvmrc
+31 −0 CHANGES.md
+3 −3 ckeditor.js
+2 −0 core/ckeditor_base.js
+8 −6 core/creators/inline.js
+3 −1 core/creators/themedui.js
+20 −3 core/editable.js
+6 −6 core/filter.js
+3 −2 core/scriptloader.js
+9 −0 core/selection/optimization.js
+65 −0 core/tools.js
+1 −1 package-lock.json
+1 −1 package.json
+1 −1 plugins/colorbutton/plugin.js
+6 −0 plugins/colordialog/plugin.js
+15 −15 plugins/dialog/plugin.js
+5 −5 plugins/emoji/lang/zh-cn.js
+4 −1 plugins/format/plugin.js
+32 −1 plugins/stylescombo/plugin.js
+31 −20 plugins/tableresize/plugin.js
+55 −0 tests/core/ckeditor/detachready.js
+3 −0 tests/core/creators/inlineallonalreadyinlined.html
+33 −0 tests/core/creators/inlineallonalreadyinlined.js
+24 −0 tests/core/creators/manual/inlineallonalreadyinlined.html
+16 −0 tests/core/creators/manual/inlineallonalreadyinlined.md
+25 −0 tests/core/editable/manual/pastearabic.html
+16 −0 tests/core/editable/manual/pastearabic.md
+30 −0 tests/core/editable/manual/pastearabicenterbr.html
+16 −0 tests/core/editable/manual/pastearabicenterbr.md
+34 −0 tests/core/editable/manual/typeime.html
+23 −0 tests/core/editable/manual/typeime.md
+253 −0 tests/core/editable/textnormalization.js
+121 −0 tests/core/filter/transformations.js
+10 −0 tests/core/tools/array.js
+73 −0 tests/core/tools/isvalidcolorformat.js
+84 −0 tests/plugins/autogrow/autogrow.js
+19 −0 tests/plugins/autogrow/manual/autogrowwidth.html
+14 −0 tests/plugins/autogrow/manual/autogrowwidth.md
+5 −0 tests/plugins/dialog/plugin.js
+7 −0 tests/plugins/stylescombo/manual/removeblockformat.html
+17 −0 tests/plugins/stylescombo/manual/removeblockformat.md
+172 −0 tests/plugins/stylescombo/stylescombo.js
+33 −0 tests/plugins/tableresize/manual/rowspan.html
+17 −0 tests/plugins/tableresize/manual/rowspan.md
+6 −2 tests/plugins/tableselection/integrations/tabletools/tabletools.js
+61 −0 tests/plugins/tableselection/manual/safaritheadlastcolumn.html
+15 −0 tests/plugins/tableselection/manual/safaritheadlastcolumn.md
+52 −0 tests/plugins/tableselection/manual/safaritheadlastcolumnmouse.html
+15 −0 tests/plugins/tableselection/manual/safaritheadlastcolumnmouse.md
+43 −0 tests/tickets/4282/1.js
+3 −0 tests/tickets/4282/_assets/a1.js
+3 −0 tests/tickets/4282/_assets/a2.js
+3 −0 tests/tickets/4282/_assets/a3.js
14 changes: 11 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"private": true,
"name": "ckeditor4-presets",
"version": "4.15.0",
"description": "CKEditor 4 Presets Builder.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"ckeditor4",
"ckeditor",
Expand All @@ -27,7 +25,8 @@
},
"homepage": "https://ckeditor.com",
"dependencies": {
"ckeditor4-plugin-exportpdf": "1.0.0"
},
"private": true
"ckeditor4-plugin-exportpdf": "1.0.1",
"ckeditor-plugin-scayt": "https://github.com/WebSpellChecker/ckeditor-plugin-scayt#release.5.7.0.0",
"ckeditor-plugin-wsc": "https://github.com/WebSpellChecker/ckeditor-plugin-wsc#release.5.7.0.0"
}
}
1 change: 0 additions & 1 deletion plugins/scayt
Submodule scayt deleted from efb6f5
1 change: 0 additions & 1 deletion plugins/wsc
Submodule wsc deleted from ddf2e0

0 comments on commit e15f2c6

Please sign in to comment.