Merge pull request #29 from mortenlj/master

Fix ordering of tasks
This commit is contained in:
2022-10-21 13:41:47 -04:00
committed by GitHub
3 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -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
+12
View File
@@ -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
+9
View File
@@ -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."* ]]
}