From 38a1d2002e1a36a3ace2e3becc8bc215e48c8ed4 Mon Sep 17 00:00:00 2001 From: Peter Rotich Date: Thu, 14 Feb 2013 15:08:10 -0500 Subject: [PATCH] Package .md files (README + WHATSNEW) as .txt --- setup/cli/package.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup/cli/package.php b/setup/cli/package.php index 22542b6e..9b5ecae5 100755 --- a/setup/cli/package.php +++ b/setup/cli/package.php @@ -115,6 +115,12 @@ function package($pattern, $destination, $recurse=false, $exclude=false) { # Load the license and documentation package("*.{txt,md}", ""); +#Rename markdown as text TODO: Do html version before rename. +if(($mds = glob("$stage_path/*.md"))) { + foreach($mds as $md) + rename($md, preg_replace('/\.md$/', '.txt', $md)); +} + # Make an archive of the stage folder $version_info = preg_grep('/THIS_VERSION/', explode("\n", file_get_contents("$root/main.inc.php")));