Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor core): updated editor core to v1.24.1 #562

Merged
merged 2 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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