Skip to content

Commit

Permalink
fix(editor core): updated editor core to v1.24.1 (#562)
Browse files Browse the repository at this point in the history
* fix(editor core): updated editor core to v1.24.1

Closes #490 - Update core to 1.24.1

* fix(editor core): corrected core version in script
  • Loading branch information
sr258 authored May 28, 2020
1 parent 4b0e228 commit b9eaffe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
32 changes: 26 additions & 6 deletions scripts/download-core.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Call this script with the version of the H5P core as the first argument
# (= version tag of h5p-php-library) and the H5P editor as the second argument
# (= version tag of h5p-editor-php-library).
# Example: scripts/download-core.sh 1.24.0 1.24.1

core_version=$1
if [ ! -z "$2" ]
then
editor_version=$2
else
editor_version=$1
fi

if [ -z "$core_version" ]
then
echo "You must add the H5P core version as the first argument to this script."
exit
fi

echo "Downloading H5P core v$core_version..."
echo "Downloading H5P editor v$editor_version..."

base="$(dirname $0)/../h5p"
mkdir -p "$base/tmp"
mkdir -p "$base/tmp/core"
Expand All @@ -10,16 +32,14 @@ rm -rf "$base/tmp"/*
rm -rf "$base/core"/*
rm -rf "$base/editor"/*

version=$1

core=https://github.com/h5p/h5p-php-library/archive/$version.zip
editor=https://github.com/h5p/h5p-editor-php-library/archive/$version.zip
core=https://github.com/h5p/h5p-php-library/archive/$core_version.zip
editor=https://github.com/h5p/h5p-editor-php-library/archive/$editor_version.zip

curl -L $core -o"$base/tmp/core.zip"
unzip -a "$base/tmp/core.zip" -d"$base/tmp/core"
curl -L $editor -o"$base/tmp/editor.zip"
unzip -a "$base/tmp/editor.zip" -d"$base/tmp/editor"
mv "$base/tmp/core/h5p-php-library-$version"/* "$base/core/"
mv "$base/tmp/editor/h5p-editor-php-library-$version"/* "$base/editor/"
mv "$base/tmp/core/h5p-php-library-$core_version"/* "$base/core/"
mv "$base/tmp/editor/h5p-editor-php-library-$editor_version"/* "$base/editor/"

rm -rf "$base/tmp"
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sh scripts/download-core.sh 1.24.0
sh scripts/download-core.sh 1.24.0 1.24.1
# node scrape-examples.js > examples.json

0 comments on commit b9eaffe

Please sign in to comment.