Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow more license Types #648

Open
wants to merge 13 commits into
base: development
Choose a base branch
from
2 changes: 1 addition & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"license": {
"description": "Open source license under which the project is licensed",
"enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache"]
"enum": ["GPL", "LGPL", "BSD", "Public", "MIT", "Apache", "MPL"]
},
"version": { "$ref": "#/definitions/semver" },
"classPath": {
Expand Down
1 change: 1 addition & 0 deletions src/haxelib/Data.hx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ typedef DefineDocumentation = {
var Bsd = 'BSD';
var Public = 'Public';
var Apache = 'Apache';
var Mpl = 'MPL';
@:disallowed
var Unknown = 'Unknown';
}
Expand Down
2 changes: 1 addition & 1 deletion src/legacyhaxelib/Data.hx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Data {
public static var DOCXML = "haxedoc.xml";
public static var REPOSITORY = "files";
public static var alphanum = ~/^[A-Za-z0-9_.-]+$/;
static var LICENSES = ["GPL","LGPL","BSD","Public","MIT"];
static var LICENSES = ["GPL","LGPL","BSD","Public","MIT", "Apache", "MPL"];
dimensionscape marked this conversation as resolved.
Show resolved Hide resolved

static function requiredAttribute( x : Xml, name ) {
var v = x.get(name);
Expand Down
2 changes: 1 addition & 1 deletion test/tests/integration/TestSubmit.hx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class TestSubmit extends IntegrationTests {

final r = haxelib(["submit", Path.join([IntegrationTests.projectRoot, "test/libraries/libInvalidLicense.zip"]), bar.pw]).result();
assertFail(r);
assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache", r.err.trim());
assertEquals("Error: Invalid value `Unknown` for License. Allowed values: GPL, LGPL, MIT, BSD, Public, Apache, MPL", r.err.trim());

final r = haxelib(["search", "Bar"]).result();
// did not get submitted
Expand Down