From 0b68efcf87b9ca8b465fa610372896fb9d568e4a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 27 Oct 2017 14:41:48 +0200 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ README.md | 20 ++++++++++++++++++++ bin/make-release.sh | 41 +++++++++++++++++++++++++++++++++++++++++ composer.json | 30 ++++++++++++++++++++++++++++++ run.php | 3 +++ 5 files changed, 96 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 run.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..987e2a2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +composer.lock +vendor diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ce6c37 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +ipl 3rd Party PHP libraries +=========================== + +This repository replicates 3rd party libraries used or suggested by the `ipl` +(Icinga PHP Library). + +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..28e1644 --- /dev/null +++ b/composer.json @@ -0,0 +1,30 @@ +{ + "name": "Icinga/ipl-3rdparty", + "type": "library", + "description": "ipl 3rd party PHP libraries", + "homepage": "https://github.com/Icinga/libipl-3rdparty", + "license": "MIT", + "support": { + "issues": "https://github.com/Icinga/libipl-3rdparty/issues" + }, + "require": { + "php": ">=5.4.0", + "ext-curl": "*", + "psr/http-message": "^1", + "predis/predis": "^1.1", + "react/child-process": "^0.5", + "react/dns": "^0.4", + "react/datagram": "^1", + "react/http": "^0.7", + "react/http-client": "^0.5", + "react/stream": "^0.7", + "react/socket": "^0.8", + "clue/redis-react": "^2", + "guzzlehttp/guzzle": "^5", + "clue/socks-react": "^0.8", + "clue/http-proxy-react": "^1.2", + "clue/connection-manager-extra": "^1.1" + }, + "require-dev": { + } +} diff --git a/run.php b/run.php new file mode 100644 index 0000000..cdc28bc --- /dev/null +++ b/run.php @@ -0,0 +1,3 @@ +