diff options
| author | ruki <[email protected]> | 2021-08-18 00:47:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-18 00:47:49 +0800 |
| commit | 00107046b0c8eb07185b24783b2d32114f9ed760 (patch) | |
| tree | 8fc2df521d35fcea98d51d9dd87afe68a1785ee4 /xmake/modules/private/action | |
| parent | 139d4b590a4ad763f0c9e43f59e8281383e4212b (diff) | |
add require --upgrade
Diffstat (limited to 'xmake/modules/private/action')
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/install.lua | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 5dc0ff451..53e978f9a 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -204,7 +204,9 @@ end -- has locked requires? function _has_locked_requires() - return project.policy("package.requires_lock") and os.isfile(project.requireslock()) + if not option.get("upgrade") then + return project.policy("package.requires_lock") and os.isfile(project.requireslock()) + end end -- get locked requires diff --git a/xmake/modules/private/action/require/install.lua b/xmake/modules/private/action/require/install.lua index 821991dee..e27e627cb 100644 --- a/xmake/modules/private/action/require/install.lua +++ b/xmake/modules/private/action/require/install.lua @@ -76,7 +76,7 @@ function main(requires_raw) -- -- attempt to install git from the builtin-packages first if git not found -- - if git and not repository.pulled() then + if git and (not repository.pulled() or option.get("upgrade")) then task.run("repo", {update = true}) end |
