summaryrefslogtreecommitdiff
path: root/xmake/core/project/requireinfo.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-08 11:07:41 +0800
committerruki <[email protected]>2020-11-08 11:07:41 +0800
commitea6afc015b3c3f391761ba13a03c966daedd6db4 (patch)
tree5ad9183da6470ba09542bd8b6634d149a9647fb0 /xmake/core/project/requireinfo.lua
parent8b032f72b8f3972fe702b6f3f20d07d2d1696739 (diff)
add check_licenses
Diffstat (limited to 'xmake/core/project/requireinfo.lua')
-rw-r--r--xmake/core/project/requireinfo.lua15
1 files changed, 4 insertions, 11 deletions
diff --git a/xmake/core/project/requireinfo.lua b/xmake/core/project/requireinfo.lua
index 2290b4f44..2ae0a8650 100644
--- a/xmake/core/project/requireinfo.lua
+++ b/xmake/core/project/requireinfo.lua
@@ -109,22 +109,17 @@ function requireinfo:version()
-- get version
local version = nil
- local verstr = self:get("__version")
+ local verstr = self:get("version")
if verstr then
version = semver.new(verstr)
end
-
- -- save to cache
self._VERSION = version or false
-
- -- done
return version
end
--- set the package version
-function requireinfo:version_set(version)
- self._VERSION = nil
- self:set("__version", version)
+-- get the package license
+function requireinfo:license()
+ return self:get("license")
end
-- get the require string
@@ -202,8 +197,6 @@ function requireinfo.load(name)
local instance = table.inherit(requireinfo)
instance._INFO = info
instance._NAME = name
-
- -- ok
return instance
end