Skip to content

Commit

Permalink
Fix error install.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Valentin Popov <info@valentineus.link>
  • Loading branch information
valentineus committed Jun 19, 2018
1 parent bdaf1d3 commit 3fa97ba
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 51 deletions.
84 changes: 45 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
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:
- 5.6
- 7.0
- 7.1
- 7.2

env:
- DB=pgsql MOODLE_BRANCH=MOODLE_26_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_27_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_28_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_29_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_30_STABLE
- 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
global:
- MOODLE_BRANCH=MOODLE_35_STABLE
matrix:
- DB=mysqli
- DB=pgsql

before_install:
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
- cd ../..
- 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"

install:
Expand All @@ -40,31 +43,34 @@ script:
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci csslint
- moodle-plugin-ci shifter
- moodle-plugin-ci jshint
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat

jobs:
include:
stage: deploy
- stage: test old
env: DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
php: 5.6

env:
- DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
- stage: deploy
php: 7.2

php: 7.1
before_deploy:
- cd "$TRAVIS_REPO_SLUG"
- git stash --all
- /bin/sh build.sh

before_deploy:
- cd $TRAVIS_REPO_SLUG
- git stash --all
- /bin/sh build.sh
deploy:
api_key: $GITHUB_PROJECT_TOKEN
email: "info@valentineus.link"
file: "../build/*.zip"
file_glob: true
provider: releases
skip_cleanup: true

deploy:
provider: releases
skip_cleanup: true
file: "../local_webhooks.zip"
email: "info@valentineus.link"
api_key: $GITHUB_PROJECT_TOKEN
on:
tags: true
on:
tags: true
29 changes: 20 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
#!/bin/sh
# Author: Valentin Popov
# Email: info@valentineus.link
# Date: 2017-10-19
# Usage: /bin/sh build.sh
# Date: 2018-06-19
# Usage: /bin/sh ./build.sh
# Description: Build the final package for installation in Moodle.

# Updating the Environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export PATH="$PATH:/usr/local/scripts"

# Build the package
cd ..
mv "./moodle-webhooks" "./local_webhooks"
zip -9 -r "local_webhooks.zip" "local_webhooks" \
-x "local_webhooks/.git*" \
-x "local_webhooks/.travis.yml" \
-x "local_webhooks/build.sh"
# Current project
PROJECT="local_webhooks"

# Defining directories
DIRECTORY="$(pwd)"
NAMEDIR="$(basename $DIRECTORY)"
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
exit 0
2 changes: 1 addition & 1 deletion db/install.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?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>
<TABLE NAME="local_webhooks_service" COMMENT="A table for storing callback services.">
<FIELDS>
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

defined("MOODLE_INTERNAL") || die();

$plugin->release = "3.0.0 (Build: 2017112600)";
$plugin->version = 2017112600;
$plugin->release = "3.0.1 (Build: 2018061900)";
$plugin->version = 2018061900;
$plugin->requires = 2016112900;
$plugin->component = "local_webhooks";
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 3fa97ba

Please sign in to comment.