Initial import
This commit is contained in:
commit
6329a62d39
|
@ -0,0 +1,4 @@
|
|||
/vendor/
|
||||
/.idea/
|
||||
.*.sw[op]
|
||||
composer.lock
|
|
@ -0,0 +1,31 @@
|
|||
Icinga Web 2 - IPL
|
||||
==================
|
||||
|
||||
This module ships the new Icinga PHP library. Please download the latest
|
||||
release and install it like any other module.
|
||||
|
||||
```sh
|
||||
RELEASES="https://github.com/Icinga/icingaweb2-module-ipl/archive" \
|
||||
&& MODULES_PATH="/usr/share/icingaweb2/modules" \
|
||||
&& MODULE_VERSION=0.1.0 \
|
||||
&& mkdir "$MODULES_PATH" \
|
||||
&& wget -q $RELEASES/v${MODULE_VERSION}.tar.gz -O - \
|
||||
| tar xfz - -C "$MODULES_PATH" --strip-components 1
|
||||
icingacli module enable ipl
|
||||
```
|
||||
|
||||
|
||||
Developer Documentation
|
||||
-----------------------
|
||||
|
||||
### Add a new dependency
|
||||
|
||||
composer require author/library:version
|
||||
|
||||
### Create a new release
|
||||
|
||||
./bin/make-release.sh <version>
|
||||
|
||||
e.g.
|
||||
|
||||
./bin/make-release.sh 0.1.0
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION="$1"
|
||||
|
||||
if [ -z $VERSION ]; then
|
||||
echo "USAGE: $0 <version>"
|
||||
echo " e.g.: $0 0.1.0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$(git tag | grep -c "$VERSION")
|
||||
|
||||
if [ "$TAG" -ne "0" ]; then
|
||||
echo -n "Version $VERSION has already been tagged: "
|
||||
git tag | grep "$VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BRANCH="stable/$VERSION"
|
||||
git checkout -b "$BRANCH"
|
||||
git rm -rf vendor
|
||||
rm -rf vendor
|
||||
rm composer.lock
|
||||
composer install
|
||||
find vendor/ -type f -name "*.php" \
|
||||
| grep -v '/examples/' \
|
||||
| grep -v '/example/' \
|
||||
| grep -v '/tests/' \
|
||||
| grep -v '/test/' \
|
||||
| xargs -l git add -f
|
||||
find vendor/ -type f -name LICENSE | xargs -l git add -f
|
||||
git commit -m "Version v$VERSION"
|
||||
|
||||
rm -f composer.lock
|
||||
rm -rf vendor
|
||||
git checkout vendor
|
||||
|
||||
git tag -a v$VERSION -m "Version v$VERSION"
|
||||
echo "Finished, tagged v$VERSION"
|
||||
echo "Now please run:"
|
||||
echo "git push origin "$BRANCH":"$BRANCH" && git push --tags"
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "icinga/icingaweb2-module-ipl",
|
||||
"type": "project",
|
||||
"homepage": "https://github.com/Icinga/icingaweb2-module-ipl",
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"repositories": [{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/Icinga/ipl-stdlib",
|
||||
"no-api":true
|
||||
}, {
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/Icinga/ipl-html",
|
||||
"no-api":true
|
||||
}, {
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/Icinga/ipl-sql",
|
||||
"no-api":true
|
||||
}],
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"ipl/stdlib": "dev-master",
|
||||
"ipl/html": "dev-master",
|
||||
"ipl/sql": "dev-master"
|
||||
},
|
||||
"require-dev": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
Name: Gipfl Bundle
|
||||
Version: v0.1.0
|
||||
Description: Gipfl provides bleeding-edge libraries
|
||||
This repository ships libraries useful for Icinga Web 2 modules. Please download
|
||||
the latest release and install it like any other module.
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Icinga\Module\Ipl {
|
||||
|
||||
use Icinga\Application\Hook\ApplicationStateHook;
|
||||
|
||||
class ApplicationState extends ApplicationStateHook
|
||||
{
|
||||
public function collectMessages()
|
||||
{
|
||||
$this->addError(
|
||||
'ipl.master',
|
||||
time(),
|
||||
'Please install a Release version of the IPL module, not the GIT master'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->provideHook('ApplicationState', '\\Icinga\\Module\\Ipl\\ApplicationState');
|
||||
}
|
Loading…
Reference in New Issue