com web/pecl: Strongly recommend including a licesnse, but not require it: public_html/release-upload.php
| From: | Hannes Magnusson | Date: | Mon, 21 Oct 2013 00:15:25 +0000 |
| Subject: | com web/pecl: Strongly recommend including a licesnse, but not require it: public_html/release-upload.php | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-19931@lists.php.net to get a copy of this message | ||
Commit: 2fe59d588033122352664c478700c7d088060d7f
Author: Hannes Magnusson <bjori@php.net> Mon, 21 Oct 2013 00:15:25 +0000
Parents: 988ef2faccedb8a379b013a8b1d06b4de17a174a
Branches: old_auth
Link: http://git.php.net/?p=web/pecl.git;a=commitdiff;h=2fe59d588033122352664c478700c7d088060d7f
Log:
Strongly recommend including a licesnse, but not require it
Changed paths:
M public_html/release-upload.php
Diff:
diff --git a/public_html/release-upload.php b/public_html/release-upload.php
index bfe1704..0cef419 100644
--- a/public_html/release-upload.php
+++ b/public_html/release-upload.php
@@ -90,32 +90,6 @@ do {
break;
}
- $license_found = false;
- foreach ($info->getFileList() as $file_name => $file_data) {
- if ("doc" != $file_data["role"]) {
- continue;
- }
-
- /* Don't compare with basename($file_data["name"]), the license has
- to be in the package root. */
- $lic_fnames = array(
- "LICENSE", "license",
- "COPYING", "copying",
- "LICENSE.md", "license.md",
- "COPYING.md", "copying.md",
- "LICENSE.txt", "license.txt",
- "COPYING.txt", "copying.txt"
- );
- if (in_array($file_data["name"], $lic_fnames)) {
- $license_found = true;
- break;
- }
- }
- if (!$license_found) {
- $errors[] = "No LICENSE or COPYING file was found in the root of the package. ";
- break;
- }
-
$pkg_version_ok = false;
$pkg_version_macros_found = false;
$pkg_xml_ext_version = $info->getVersion();
@@ -419,6 +393,32 @@ if ($display_verification) {
'supported at pecl.php.net, only Extension releases are supported. ' .
'pear..php.net supports php packages';
}
+
+ $license_found = false;
+ foreach ($info->getFileList() as $file_name => $file_data) {
+ if ("doc" != $file_data["role"]) {
+ continue;
+ }
+
+ /* Don't compare with basename($file_data["name"]), the license has
+ to be in the package root. */
+ $lic_fnames = array(
+ "LICENSE", "license",
+ "LICENSE.md", "license.md",
+ "COPYING", "copying",
+ "COPYING.md", "copying.md",
+ "LICENSE.txt", "license.txt",
+ "COPYING.txt", "copying.txt"
+ );
+ if (in_array($file_data["name"], $lic_fnames)) {
+ $license_found = true;
+ break;
+ }
+ }
+ if (!$license_found) {
+ $warnings[] = "No LICENSE or COPYING file was found in the root of the package. ";
+ }
+
report_error($errors, 'errors','ERRORS:<br />'
. 'You must correct your package.xml file:');
report_error($warnings, 'warnings', 'RECOMMENDATIONS:<br />'