From 36a65482e26c4c24d9565f271fef33fc15454103 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Thu, 1 Nov 2018 20:28:55 +0100 Subject: [PATCH] Add badges to ReadMe [skip ci] --- README.md | 5 +++++ RoboFile.php | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3479cab..4b72d1b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +[![Build Status](https://travis-ci.org/stklcode/statify-blacklist.svg?branch=master)](https://travis-ci.org/stklcode/statify-blacklist) +[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=de.stklcode.web.wordpress.plugins%3Astatify-blacklist&metric=alert_status)](https://sonarcloud.io/dashboard?id=de.stklcode.web.wordpress.plugins%3Astatify-blacklist) +[![Packagist Version](https://img.shields.io/packagist/v/stklcode/statify-blacklist.svg)](https://packagist.org/packages/pluginkollektiv/statify) +[![License](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://github.com/stklcode/statify-blacklist/blob/master/LICENSE.txt) + # Statify Blacklist # * Contributors: Stefan Kalscheuer * Requires at least: 4.7 diff --git a/RoboFile.php b/RoboFile.php index e991634..b08f75b 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -139,8 +139,14 @@ class RoboFile extends Tasks { 'views' => $this->target_dir . '/' . $this->final_name . '/views', ] )->run(); $this->_copy( 'statify-blacklist.php', $this->target_dir . '/' . $this->final_name . '/statify-blacklist.php' ); - $this->_copy( 'README.md', $this->target_dir . '/' . $this->final_name . '/README.md' ); $this->_copy( 'LICENSE.md', $this->target_dir . '/' . $this->final_name . '/LICENSE.md' ); + $this->_copy( 'README.md', $this->target_dir . '/' . $this->final_name . '/README.md' ); + + // Remove content before title (e.g. badges) from README file. + $this->taskReplaceInFile( $this->target_dir . '/' . $this->final_name . '/README.md' ) + ->regex( '/^[^\\#]*/' ) + ->to( '' ) + ->run(); } /**