summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-08-20 00:33:19 +0800
committerruki <[email protected]>2021-08-20 00:33:19 +0800
commit0eac4a64692796d99a1a30f206a2d21463e0acf6 (patch)
tree6ef9c692027194ed2257349fd6cbfcb000154e87
parent8255e9894b9d1b29ecb479190ab2e9f1e6e8388c (diff)
improve reponame
-rw-r--r--tests/projects/package/multiconfig/xmake-requires.lock6
-rw-r--r--xmake/modules/private/action/require/impl/repository.lua2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/projects/package/multiconfig/xmake-requires.lock b/tests/projects/package/multiconfig/xmake-requires.lock
index 6adbab999..e8621f5b3 100644
--- a/tests/projects/package/multiconfig/xmake-requires.lock
+++ b/tests/projects/package/multiconfig/xmake-requires.lock
@@ -9,7 +9,7 @@
plat = "macosx",
repo = {
branch = "master",
- commit = "e87effa464611cecf28dfced70cbe491a08fe99d",
+ commit = "df6cad5cf5701de3705c7afce54d732e1f5b14b9",
url = "https://gitee.com/tboox/xmake-repo.git"
},
version = "1.2.11"
@@ -21,7 +21,7 @@
plat = "macosx",
repo = {
branch = "master",
- commit = "e87effa464611cecf28dfced70cbe491a08fe99d",
+ commit = "df6cad5cf5701de3705c7afce54d732e1f5b14b9",
url = "https://gitee.com/tboox/xmake-repo.git"
},
version = "1.2.11"
@@ -33,7 +33,7 @@
plat = "macosx",
repo = {
branch = "master",
- commit = "e87effa464611cecf28dfced70cbe491a08fe99d",
+ commit = "df6cad5cf5701de3705c7afce54d732e1f5b14b9",
url = "https://gitee.com/tboox/xmake-repo.git"
},
version = "1.2.11"
diff --git a/xmake/modules/private/action/require/impl/repository.lua b/xmake/modules/private/action/require/impl/repository.lua
index a2764916d..528aebc54 100644
--- a/xmake/modules/private/action/require/impl/repository.lua
+++ b/xmake/modules/private/action/require/impl/repository.lua
@@ -36,9 +36,9 @@ function _get_packagedir_from_locked_repo(packagename, locked_repo)
break
end
end
+ local reponame = hash.uuid(locked_repo.url):gsub("%-", ""):lower() .. ".lock"
-- clone repository to local
- local reponame = path.basename(locked_repo.url) .. ".lock"
local repodir_local = path.join(config.directory(), "repositories", reponame)
if not os.isdir(repodir_local) then
if repodir_global then