Compare commits

...

2 Commits

Author SHA1 Message Date
f9772b1fb9
Fix check MOODLE_INTERNAL
Signed-off-by: Valentin Popov <info@valentineus.link>
2018-06-19 22:22:45 +04:00
3fa97bad31
Fix error install.xml
Signed-off-by: Valentin Popov <info@valentineus.link>
2018-06-19 19:49:00 +04:00
16 changed files with 81 additions and 64 deletions

View File

@ -1,35 +1,38 @@
language: php language: php
sudo: true
sudo: false addons:
firefox: "latest-esr"
postgresql: "9.6"
apt:
packages:
- "oracle-java8-installer"
- "oracle-java8-set-default"
os: "linux" cache:
directories:
- "$HOME/.composer/cache"
- "$HOME/.npm"
php: php:
- 5.6 - 7.0
- 7.1 - 7.1
- 7.2
env: env:
- DB=pgsql MOODLE_BRANCH=MOODLE_26_STABLE global:
- DB=pgsql MOODLE_BRANCH=MOODLE_27_STABLE - MOODLE_BRANCH=MOODLE_35_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_28_STABLE matrix:
- DB=pgsql MOODLE_BRANCH=MOODLE_29_STABLE - DB=mysqli
- DB=pgsql MOODLE_BRANCH=MOODLE_30_STABLE - DB=pgsql
- DB=pgsql MOODLE_BRANCH=MOODLE_31_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_32_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_33_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_26_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_27_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_28_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_29_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_30_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_31_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_32_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
before_install: before_install:
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
- cd ../.. - cd ../..
- composer selfupdate - composer selfupdate
- composer create-project -n --no-dev moodlerooms/moodle-plugin-ci ci ^1 - composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH" - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
install: install:
@ -40,31 +43,34 @@ script:
- moodle-plugin-ci phpcpd - moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd - moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker - moodle-plugin-ci codechecker
- moodle-plugin-ci csslint - moodle-plugin-ci validate
- moodle-plugin-ci shifter - moodle-plugin-ci savepoints
- moodle-plugin-ci jshint - moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci phpunit - moodle-plugin-ci phpunit
- moodle-plugin-ci behat - moodle-plugin-ci behat
jobs: jobs:
include: include:
stage: deploy - stage: test old
env: DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
php: 5.6
env: - stage: deploy
- DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE php: 7.2
php: 7.1 before_deploy:
- cd "$TRAVIS_REPO_SLUG"
- git stash --all
- /bin/sh build.sh
before_deploy: deploy:
- cd $TRAVIS_REPO_SLUG api_key: $GITHUB_PROJECT_TOKEN
- git stash --all email: "info@valentineus.link"
- /bin/sh build.sh file: "../build/*.zip"
file_glob: true
provider: releases
skip_cleanup: true
deploy: on:
provider: releases tags: true
skip_cleanup: true
file: "../local_webhooks.zip"
email: "info@valentineus.link"
api_key: $GITHUB_PROJECT_TOKEN
on:
tags: true

View File

@ -1,21 +1,32 @@
#!/bin/sh #!/bin/sh
# Author: Valentin Popov # Author: Valentin Popov
# Email: info@valentineus.link # Email: info@valentineus.link
# Date: 2017-10-19 # Date: 2018-06-19
# Usage: /bin/sh build.sh # Usage: /bin/sh ./build.sh
# Description: Build the final package for installation in Moodle. # Description: Build the final package for installation in Moodle.
# Updating the Environment # Updating the Environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PATH="$PATH:/usr/local/scripts" export PATH="$PATH:/usr/local/scripts"
# Build the package # Current project
cd .. PROJECT="local_webhooks"
mv "./moodle-webhooks" "./local_webhooks"
zip -9 -r "local_webhooks.zip" "local_webhooks" \ # Defining directories
-x "local_webhooks/.git*" \ DIRECTORY="$(pwd)"
-x "local_webhooks/.travis.yml" \ NAMEDIR="$(basename $DIRECTORY)"
-x "local_webhooks/build.sh" TMPDIR="$(mktemp --directory)"
# Creating a Temporary Directory
cp --recursive --verbose "../$NAMEDIR" "$TMPDIR/$PROJECT"
mkdir --parents --verbose "$DIRECTORY/build"
cd "$TMPDIR"
# Creating an archive
zip -9 -r "$DIRECTORY/build/$PROJECT.zip" "$PROJECT" \
-x "$PROJECT/.git*" \
-x "$PROJECT/.travis.yml" \
-x "$PROJECT/build*"
# End of work # End of work
exit 0 exit 0

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks\event; namespace local_webhooks\event;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Defines how to work with events. * Defines how to work with events.

View File

@ -24,7 +24,7 @@
namespace local_webhooks; namespace local_webhooks;
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . "/../lib.php"); require_once(__DIR__ . "/../lib.php");
require_once(__DIR__ . "/../locallib.php"); require_once(__DIR__ . "/../locallib.php");

View File

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . "/formslib.php"); require_once($CFG->libdir . "/formslib.php");

View File

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
$observers = array( $observers = array(
array( array(

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="blocks/local_webhooks/db" VERSION="20171029" COMMENT="XMLDB file for Moodle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd"> <XMLDB PATH="local/webhooks/db" VERSION="2018061900" COMMENT="XMLDB file for Moodle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd">
<TABLES> <TABLES>
<TABLE NAME="local_webhooks_service" COMMENT="A table for storing callback services."> <TABLE NAME="local_webhooks_service" COMMENT="A table for storing callback services.">
<FIELDS> <FIELDS>

View File

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . "/locallib.php"); require_once(__DIR__ . "/locallib.php");

View File

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
/** /**
* Description of functions of the call of events * Description of functions of the call of events

View File

@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
if ($hassiteconfig) { if ($hassiteconfig) {
$ADMIN->add("server", new admin_externalpage("local_webhooks", $ADMIN->add("server", new admin_externalpage("local_webhooks",

View File

@ -22,10 +22,10 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
defined("MOODLE_INTERNAL") || die(); defined('MOODLE_INTERNAL') || die();
$plugin->release = "3.0.0 (Build: 2017112600)"; $plugin->release = "3.0.1 (Build: 2018061900)";
$plugin->version = 2017112600; $plugin->version = 2018061900;
$plugin->requires = 2016112900; $plugin->requires = 2016112900;
$plugin->component = "local_webhooks"; $plugin->component = "local_webhooks";
$plugin->maturity = MATURITY_STABLE; $plugin->maturity = MATURITY_STABLE;