Skip to content

Commit c420269

Browse files
committed
improve clean
1 parent a6ba37e commit c420269

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

xmake/actions/clean/main.lua

+3-6
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,15 @@ function main()
156156
return remote_build_action()
157157
end
158158

159+
-- load config first
160+
task.run("config", {require = false}, {disable_dump = true})
161+
159162
-- lock the whole project
160163
project.lock()
161164

162165
-- get the target name
163166
local targetname = option.get("target")
164167

165-
-- local config first
166-
config.load()
167-
168-
-- load targets
169-
project.load_targets()
170-
171168
-- enter project directory
172169
local oldir = os.cd(project.directory())
173170

xmake/actions/install/main.lua

+1-4
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ end
6565
function main()
6666

6767
-- load config first
68-
config.load()
69-
70-
-- load targets
71-
project.load_targets()
68+
task.run("config", {require = false}, {disable_dump = true})
7269

7370
-- check targets first
7471
local targetname

xmake/actions/test/main.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,12 @@ function main()
443443
return remote_build_action()
444444
end
445445

446-
-- lock the whole project
447-
project.lock()
448-
449446
-- load config first
450447
task.run("config", {}, {disable_dump = true})
451448

449+
-- lock the whole project
450+
project.lock()
451+
452452
-- get tests
453453
local tests = get_tests()
454454
local test_patterns = option.get("tests")

xmake/actions/uninstall/main.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import("uninstall")
2828

2929
function main()
3030

31-
-- config it first
32-
local targetname = option.get("target")
33-
task.run("config", {require = "n", verbose = false})
31+
-- load config first
32+
task.run("config", {require = false}, {disable_dump = true})
3433

3534
-- attempt to uninstall directly
35+
local targetname = option.get("target")
3636
try
3737
{
3838
function ()

xmake/plugins/pack/main.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ function main()
112112
return remote_build_action()
113113
end
114114

115-
-- lock the whole project
116-
project.lock()
117-
118115
-- load config first
119116
task.run("config", {}, {disable_dump = true})
120117

118+
-- lock the whole project
119+
project.lock()
120+
121121
-- enter project directory
122122
local oldir = os.cd(project.directory())
123123

0 commit comments

Comments
 (0)