From 3871c675849ba764cf8865abf3ac468e7baf8e77 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 16 May 2019 16:46:11 +0200 Subject: [PATCH] README, composer: upgrade, release --- README.md | 8 ++++---- bin/make-release.sh | 13 ++++++++++--- composer.json | 5 +++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7fed512..19cab0c 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ This module ships the new Icinga PHP library. Please download the latest release and install it like any other module. > **HINT**: Do NOT install the GIT master, it will not work! Checking out a -> branch like `stable/0.2.1` or a tag like `v0.2.1` is fine. +> branch like `stable/0.3.0` or a tag like `v0.3.0` is fine. Sample Tarball installation --------------------------- ```sh MODULE_NAME=ipl -MODULE_VERSION=v0.2.1 +MODULE_VERSION=v0.3.0 MODULES_PATH="/usr/share/icingaweb2/modules" MODULE_PATH="${MODULES_PATH}/${MODULE_NAME}" RELEASES="https://github.com/Icinga/icingaweb2-module-${MODULE_NAME}/archive" @@ -27,7 +27,7 @@ Sample GIT installation ```sh MODULE_NAME=ipl -MODULE_VERSION=v0.2.1 +MODULE_VERSION=v0.3.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}" @@ -47,4 +47,4 @@ Developer Documentation e.g. - ./bin/make-release.sh 0.2.1 + ./bin/make-release.sh 0.3.0 diff --git a/bin/make-release.sh b/bin/make-release.sh index 48a5ec7..09fa68a 100755 --- a/bin/make-release.sh +++ b/bin/make-release.sh @@ -8,6 +8,12 @@ if [[ -z $VERSION ]]; then exit 1 fi +function fail { + local msg="$1" + echo "ERROR: $msg" + exit 1 +} + TAG=$(git tag | grep -c "$VERSION") if [[ "$TAG" -ne "0" ]]; then @@ -20,8 +26,8 @@ BRANCH="stable/$VERSION" git checkout -b "$BRANCH" git rm -rf vendor rm -rf vendor -rm composer.lock -composer install +rm -f composer.lock +composer install || fail "composer install failed" find vendor/ -type f -name "*.php" \ | grep -v '/examples/' \ | grep -v '/example/' \ @@ -31,11 +37,12 @@ find vendor/ -type f -name "*.php" \ find vendor/ -type f -name LICENSE | xargs -L1 git add -f sed -i.bak "s/^Version:.*/Version: v$VERSION/" module.info && rm -f module.info.bak git add module.info +git add composer.lock git commit -m "Version v$VERSION" -rm -f composer.lock rm -rf vendor git checkout vendor +composer validate --no-check-all --strict || fail "Composer validate failed" git tag -a v$VERSION -m "Version v$VERSION" echo "Finished, tagged v$VERSION" diff --git a/composer.json b/composer.json index 6ec0685..2f06b65 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name": "icinga/icingaweb2-module-ipl", "type": "project", + "description": "Icinga Web 2 - bundled ipl libraries", "homepage": "https://github.com/Icinga/icingaweb2-module-ipl", "license": "MIT", "config": { @@ -17,9 +18,9 @@ "require": { "php": ">=5.4.0", "guzzlehttp/psr7": "^1.5", - "ipl/html": "^0.1", + "ipl/html": ">=0.2.1", "ipl/sql": "dev-master", - "ipl/stdlib": "^0.1" + "ipl/stdlib": ">=0.2" }, "require-dev": { }