diff options
| author | ruki <[email protected]> | 2019-03-16 00:42:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-15 22:17:14 +0800 |
| commit | e5c057bac9799f8b7f94a2f5f7d5c14a53b675e6 (patch) | |
| tree | c3aa40276cf3a0c25ff3c21fe1f751dc364a1f2b /xmake/core/package/package.lua | |
| parent | db331ebb4595ec4380f24931163e55d587bed5b2 (diff) | |
add package references
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 9589767ab..9d605d615 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -230,6 +230,18 @@ function _instance:installdir(...) return dir end +-- get the references info of this package +function _instance:references() + local references_file = path.join(self:installdir(), "references.txt") + if os.isfile(references_file) then + local references, errors = io.load(references_file) + if not references then + os.raise(errors) + end + return references + end +end + -- get the manifest file of this package function _instance:manifest_file() return path.join(self:installdir(), "manifest.txt") |
