Skip to content

Commit

Permalink
improve clean
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Aug 14, 2024
1 parent e59a059 commit 8d67f98
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
9 changes: 3 additions & 6 deletions xmake/actions/clean/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,15 @@ function main()
return remote_build_action()
end

-- load config first
task.run("config", {require = false}, {disable_dump = true})

-- lock the whole project
project.lock()

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

-- local config first
config.load()

-- load targets
project.load_targets()

-- enter project directory
local oldir = os.cd(project.directory())

Expand Down
5 changes: 1 addition & 4 deletions xmake/actions/install/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ end
function main()

-- load config first
config.load()

-- load targets
project.load_targets()
task.run("config", {require = false}, {disable_dump = true})

-- check targets first
local targetname
Expand Down
6 changes: 3 additions & 3 deletions xmake/actions/test/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,12 @@ function main()
return remote_build_action()
end

-- lock the whole project
project.lock()

-- load config first
task.run("config", {}, {disable_dump = true})

-- lock the whole project
project.lock()

-- get tests
local tests = get_tests()
local test_patterns = option.get("tests")
Expand Down
6 changes: 3 additions & 3 deletions xmake/actions/uninstall/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ import("uninstall")

function main()

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

-- attempt to uninstall directly
local targetname = option.get("target")
try
{
function ()
Expand Down
6 changes: 3 additions & 3 deletions xmake/plugins/pack/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ function main()
return remote_build_action()
end

-- lock the whole project
project.lock()

-- load config first
task.run("config", {}, {disable_dump = true})

-- lock the whole project
project.lock()

-- enter project directory
local oldir = os.cd(project.directory())

Expand Down

0 comments on commit 8d67f98

Please sign in to comment.