Drop module related stuff

This commit is contained in:
Johannes Meyer 2021-05-28 11:02:26 +02:00
parent 649bdeaa76
commit fcb17c46ff
6 changed files with 37 additions and 78 deletions

View File

@ -1,51 +1,39 @@
Icinga Web 2 - ReactPHP-based 3rd party libraries
=================================================
# Icinga PHP Thirdparty
This repository is an attempt to ship 3rd party libraries that might be useful
for asynchronous PHP-based Icinga Web 2 modules. Please download the latest
release and install it like any other module.
This project bundles all 3rd party PHP libraries used by Icinga Web products into one piece,
which 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.9.0` or a tag like `v0.9.0` is fine.
## Requirements
Sample Tarball installation
---------------------------
* [Icinga Web 2](https://github.com/Icinga/icingaweb2) (>= 2.9)
* PHP (>= 5.6, 7+ recommended)
## 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/icinga-php`
Download or clone this repository there (e.g. `/usr/share/icinga-php/vendor`) 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=reactbundle
MODULE_VERSION=v0.9.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/icinga-php/vendor"
INSTALL_VERSION="v1.0.0"
mkdir "$INSTALL_PATH"
&& wget -q "https://github.com/Icinga/icinga-php-thirdparty/archive/$INSTALL_VERSION.tar.gz" -O - \
| tar xfz - -C "$INSTALL_PATH" --strip-components 1
```
Sample GIT installation
-----------------------
**Sample GIT installation**
```sh
MODULE_NAME=reactbundle
MODULE_VERSION=v0.9.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.9.0
INSTALL_PATH="/usr/share/icinga-php/vendor"
INSTALL_VERSION="stable/1.0.0"
git clone https://github.com/Icinga/icinga-php-thirdparty.git "$INSTALL_PATH" --branch "$INSTALL_VERSION"
```

View File

@ -36,8 +36,8 @@ find vendor/ -type f -name "*.php" \
| xargs -L1 git add -f
find vendor/ -type f -name LICENSE | xargs -L1 git add -f
find vendor/ -type f -name '*.json' | xargs -L1 git add -f
sed -i.bak "s/^Version:.*/Version: $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/reactbundle",
"type": "library",
"description": "Icinga Web 2 - ReactPHP-based 3rd party libraries",
"homepage": "https://github.com/Icinga/icingaweb2-module-reactbundle",
"name": "icinga/icinga-php-thirdparty",
"type": "project",
"description": "Icinga Web 2 - Bundle for all 3rd party PHP libraries",
"homepage": "https://github.com/Icinga/icinga-php-thirdparty",
"license": "MIT",
"config": {
"sort-packages": true,
@ -11,7 +11,7 @@
}
},
"support": {
"issues": "https://github.com/Icinga/icingaweb2-module-reactbundle/issues"
"issues": "https://github.com/Icinga/icinga-php-thirdparty/issues"
},
"require": {
"php": ">=5.6.3",

View File

@ -1,6 +0,0 @@
Name: React Bundle
Version: dev-master
Description: ReactPHP-based 3rd party libraries
This repository is an attempt to ship 3rd party libraries that might be useful
for asynchronous PHP-based 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\Reactbundle {
use Icinga\Application\Hook\ApplicationStateHook;
class ApplicationState extends ApplicationStateHook
{
public function collectMessages()
{
$this->addError(
'reactbundle.master',
time(),
'Please install a Release version of the Reactbundle module, not the GIT master'
);
}
}
$this->provideHook('ApplicationState', '\\Icinga\\Module\\Reactbundle\\ApplicationState');
}