From fd78ec38c72ca2786a755a5a57d0afb1b7057698 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 20 Jun 2017 17:32:09 +0200 Subject: [PATCH] Various small improvements --- CONTRIBUTING.md | 2 +- _build/install.sh | 4 ++-- lib/PicoTwigExtension.php | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index afa1948..0b5c38a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,7 @@ Version 1.0.0 * [Removed] ... ``` -Before pushing a new Git tag, make sure to update the `Pico::VERSION` and `Pico::VERSION_ID` constants. If you've simultaneously developed a new version of Pico's official [default theme](https://github.com/picocms/pico-theme) and/or the [`PicoDeprecated` plugin](https://github.com/picocms/pico-deprecated), make sure to remove a previously added `@dev` suffix from the corresponding dependencies in Pico's [`composer.json`](https://github.com/picocms/Pico/blob/master/composer.json). +Before pushing a new Git tag, make sure to update the `Pico::VERSION` and `Pico::VERSION_ID` constants. If you've simultaneously developed a new version of Pico's official [default theme](https://github.com/picocms/pico-theme) and/or the [`PicoDeprecated` plugin](https://github.com/picocms/pico-deprecated), make sure to create releases for them first, otherwise automatic deployment will fail. Travis CI will draft the new [release on GitHub](https://github.com/picocms/Pico/releases) automatically, but will require you to manually amend the descriptions formatting. The latest Pico version is always available at https://github.com/picocms/Pico/releases/latest, so please make sure to publish this URL rather than version-specific URLs. [Packagist](http://packagist.org/packages/picocms/pico) will be updated automatically. diff --git a/_build/install.sh b/_build/install.sh index b40f7e8..aaa50a2 100755 --- a/_build/install.sh +++ b/_build/install.sh @@ -3,7 +3,7 @@ set -e # set COMPOSER_ROOT_VERSION when necessary -if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then +if [ -z "$COMPOSER_ROOT_VERSION" ] && [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then PICO_VERSION_PATTERN="$(php -r " \$json = json_decode(file_get_contents('$TRAVIS_BUILD_DIR/composer.json'), true); if (\$json !== null) { @@ -20,7 +20,7 @@ if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ")" fi - if [ -z "$COMPOSER_ROOT_VERSION" ] && [ -n "$PICO_VERSION_PATTERN" ]; then + if [ -n "$PICO_VERSION_PATTERN" ]; then export COMPOSER_ROOT_VERSION="$PICO_VERSION_PATTERN" fi fi diff --git a/lib/PicoTwigExtension.php b/lib/PicoTwigExtension.php index b1a993c..086fca0 100644 --- a/lib/PicoTwigExtension.php +++ b/lib/PicoTwigExtension.php @@ -130,10 +130,9 @@ class PicoTwigExtension extends Twig_Extension * * This method is registered as the Twig `sort_by` filter. You can use this * filter to e.g. sort the pages array by a arbitrary meta value. Calling - * `{{ pages|sort_by("meta:nav"|split(":")) }}` returns all pages sorted by - * the meta value `nav`. Please note the `"meta:nav"|split(":")` part of - * the example. The sorting algorithm will never assume equality of two - * values, it will then fall back to the original order. The result is + * `{{ pages|sort_by([ "meta", "nav" ]) }}` returns all pages sorted by the + * meta value `nav`. The sorting algorithm will never assume equality of + * two values, it will then fall back to the original order. The result is * always sorted in ascending order, apply Twigs `reverse` filter to * achieve a descending order. *