Skip to content

Commit 6c108ad

Browse files
committed
Add build status to readme.md.
1 parent 2d7d317 commit 6c108ad

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Gruntfile.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ module.exports = function(grunt) {
33
grunt.initConfig({
44
wp_readme_to_markdown: {
55
options: {
6-
screenshot_url: 'assets/{screenshot}.png'
6+
screenshot_url: 'assets/{screenshot}.png',
7+
post_convert: addBuildStatus,
78
},
89
your_target: {
910
files: {
@@ -19,3 +20,10 @@ module.exports = function(grunt) {
1920
'wp_readme_to_markdown'
2021
]);
2122
};
23+
24+
// Add build status image to GitHub readme.
25+
function addBuildStatus(readme) {
26+
var buildImage = '<a href="https://travis-ci.org/wpengine/phpcompat"><img src="https://travis-ci.org/wpengine/phpcompat.svg?branch=master"></a>';
27+
28+
return readme.replace(/# PHP Compatibility Checker #/, '# PHP Compatibility Checker # ' + buildImage);
29+
}

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PHP Compatibility Checker #
1+
# PHP Compatibility Checker # <a href="https://travis-ci.org/wpengine/phpcompat"><img src="https://travis-ci.org/wpengine/phpcompat.svg?branch=master"></a>
22
**Contributors:** [wpengine](https://profiles.wordpress.org/wpengine), [octalmage](https://profiles.wordpress.org/octalmage), [stevenkword](https://profiles.wordpress.org/stevenkword), [taylor4484](https://profiles.wordpress.org/taylor4484)
33
**Tags:** php 7, php 5.5, php, version, compatibility, checker, wp engine, wpe, wpengine
44
**Requires at least:** 3.0.1

0 commit comments

Comments
 (0)