mirror of
https://github.com/kennethreitz/bake.git
synced 2026-06-05 23:00:17 +00:00
Fix ordering of tasks
Correct the execution order of deep dependency trees. Fixes #28.
This commit is contained in:
+1
-1
@@ -472,7 +472,7 @@ class TaskScript(BaseAction):
|
||||
|
||||
# Remove duplicates from the list.
|
||||
_actions = []
|
||||
for action in actions:
|
||||
for action in reversed(actions):
|
||||
if action not in _actions:
|
||||
_actions.append(action)
|
||||
actions = _actions
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
build: build/stage
|
||||
|
||||
build/stage: fetch
|
||||
echo Building stage
|
||||
|
||||
fetch: fetch/consul fetch/s6-overlay
|
||||
|
||||
fetch/consul:
|
||||
echo Fetching consul
|
||||
|
||||
fetch/s6-overlay:
|
||||
echo Fetching S6
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bats
|
||||
export BAKEFILE=ordering.Bakefile
|
||||
|
||||
@test "dependencies are resolved correctly" {
|
||||
run bake
|
||||
[[ "${status}" -eq 0 ]]
|
||||
[[ "${lines[0]}" == *"build…"* ]]
|
||||
[[ "${lines[1]}" == *"fetch/consul, fetch/s6-overlay, fetch, & build/stage."* ]]
|
||||
}
|
||||
Reference in New Issue
Block a user