Drop module related stuff

This commit is contained in:
Johannes Meyer 2021-05-03 16:25:51 +02:00
parent 8b4549275b
commit 703a121607
6 changed files with 29 additions and 75 deletions

View File

@ -1,50 +1,33 @@
Icinga Web 2 - IPL
==================
# Icinga PHP Library - IPL
This module ships the new Icinga PHP library. Please download the latest
release and install it like any other module.
This project bundles all Icinga PHP libraries into one piece and can be integrated as library into Icinga Web 2.
> **HINT**: Do NOT install the GIT master, it will not work! Checking out a
> branch like `stable/0.5.0` or a tag like `v0.5.0` is fine.
## Installation
Sample Tarball installation
---------------------------
Please download the latest release and install it in one of your configured library paths. The default library
path for Icinga Web 2 installations is: `/usr/share/php-Icinga`
Download or clone this repository there (e.g. `/usr/share/php-Icinga/ipl`) and you're done.
> **Note**: Do NOT install the GIT master, it will not work! Checking out a
> branch like `stable/1.0.0` or a tag like `v1.0.0` is fine.
### Examples
**Sample Tarball installation**
```sh
MODULE_NAME=ipl
MODULE_VERSION=v0.5.0
MODULES_PATH="/usr/share/icingaweb2/modules"
MODULE_PATH="${MODULES_PATH}/${MODULE_NAME}"
RELEASES="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}/archive"
mkdir "$MODULE_PATH" \
&& wget -q $RELEASES/${MODULE_VERSION}.tar.gz -O - \
| tar xfz - -C "$MODULE_PATH" --strip-components 1
icingacli module enable "${MODULE_NAME}"
INSTALL_PATH="/usr/share/php-Icinga/ipl"
INSTALL_VERSION="v1.0.0"
mkdir "$INSTALL_PATH"
&& wget -q "https://github.com/Icinga/ipl/archive/$INSTALL_VERSION.tar.gz" -O - \
| tar xfz - -C "$INSTALL_PATH" --strip-components 1
```
Sample GIT installation
-----------------------
**Sample GIT installation**
```sh
MODULE_NAME=ipl
MODULE_VERSION=v0.5.0
REPO="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}"
MODULES_PATH="/usr/share/icingaweb2/modules"
git clone ${REPO} "${MODULES_PATH}/${MODULE_NAME}" --branch "${MODULE_VERSION}"
icingacli module enable "${MODULE_NAME}"
```
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.6.0
INSTALL_PATH="/usr/share/php-Icinga/ipl"
INSTALL_VERSION="stable/1.0.0"
git clone https://github.com/Icinga/ipl.git "$INSTALL_PATH" --branch "$INSTALL_VERSION"
```

View File

@ -37,8 +37,8 @@ find vendor/ -type f -name "*.php" \
find vendor/ -type f -name LICENSE | xargs -L1 git add -f
find vendor/ -type f -name '*.json' | xargs -L1 git add -f
find vendor -type f -path 'vendor/*/asset/*' | xargs -L1 git add -f
sed -i.bak "s/^Version:.*/Version: v$VERSION/" module.info && rm -f module.info.bak
git add module.info
echo "v$VERSION" > VERSION
git add VERSION
git add composer.lock -f
git commit -m "Version v$VERSION"

View File

@ -1,8 +1,8 @@
{
"name": "icinga/icingaweb2-module-ipl",
"name": "icinga/ipl",
"type": "project",
"description": "Icinga Web 2 - bundled ipl libraries",
"homepage": "https://github.com/Icinga/icingaweb2-module-ipl",
"description": "Icinga Web 2 - bundled Icinga PHP libraries",
"homepage": "https://github.com/Icinga/ipl",
"license": "MIT",
"config": {
"sort-packages": true,
@ -12,7 +12,6 @@
},
"require": {
"php": ">=5.6.0",
"guzzlehttp/psr7": "^1.5",
"ipl/html": ">=0.3.0",
"ipl/orm": ">=0.1.0",
"ipl/sql": ">=0.1.0",

View File

@ -1,5 +0,0 @@
Name: IPL Bundle
Version: dev-master
Description: The Icinga PHP library
This repository ships libraries useful for Icinga Web 2 modules. Please download
the latest release and install it like any other module.

View File

@ -1,3 +0,0 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';

20
vendor/autoload.php vendored
View File

@ -1,20 +0,0 @@
<?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');
}