From 6329a62d39a20e9421b1fc1fb125718e33a68230 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 6 Nov 2018 13:34:30 +0100 Subject: [PATCH] Initial import --- .gitignore | 4 ++++ README.md | 31 +++++++++++++++++++++++++++++++ bin/make-release.sh | 41 +++++++++++++++++++++++++++++++++++++++++ composer.json | 29 +++++++++++++++++++++++++++++ module.info | 5 +++++ run.php | 3 +++ vendor/autoload.php | 20 ++++++++++++++++++++ 7 files changed, 133 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 bin/make-release.sh create mode 100644 composer.json create mode 100644 module.info create mode 100644 run.php create mode 100644 vendor/autoload.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..09fee10 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/vendor/ +/.idea/ +.*.sw[op] +composer.lock diff --git a/README.md b/README.md new file mode 100644 index 0000000..b89bd94 --- /dev/null +++ b/README.md @@ -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 + +e.g. + + ./bin/make-release.sh 0.1.0 diff --git a/bin/make-release.sh b/bin/make-release.sh new file mode 100755 index 0000000..0e2b31b --- /dev/null +++ b/bin/make-release.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +VERSION="$1" + +if [ -z $VERSION ]; then + echo "USAGE: $0 " + 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" diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..dba4a2f --- /dev/null +++ b/composer.json @@ -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": { + } +} diff --git a/module.info b/module.info new file mode 100644 index 0000000..b1f42b2 --- /dev/null +++ b/module.info @@ -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. diff --git a/run.php b/run.php new file mode 100644 index 0000000..cdc28bc --- /dev/null +++ b/run.php @@ -0,0 +1,3 @@ +addError( + 'ipl.master', + time(), + 'Please install a Release version of the IPL module, not the GIT master' + ); + } + } + + $this->provideHook('ApplicationState', '\\Icinga\\Module\\Ipl\\ApplicationState'); +}