feat: ✨ add mtime calculation for dependency analysis
This commit is contained in:
parent
04f2d5380f
commit
1eb63294c1
1 changed files with 7 additions and 2 deletions
|
@ -129,6 +129,7 @@ module Comfpile
|
|||
|
||||
class DependencyAnalysisArtefact < Artefact
|
||||
attr_reader :dependencies
|
||||
attr_reader :mtime
|
||||
|
||||
def initialize(*args, traverse: nil, **opts)
|
||||
super(*args, **opts)
|
||||
|
@ -143,11 +144,15 @@ module Comfpile
|
|||
@traverse = traverse || ['include', 'require', 'reference']
|
||||
|
||||
add_step do
|
||||
recursive_dependency_wait_step
|
||||
iterative_dependency_wait_step
|
||||
end
|
||||
|
||||
add_step do
|
||||
@mtime = @dependencies.map(&:mtime).max
|
||||
end
|
||||
end
|
||||
|
||||
def recursive_dependency_wait_step
|
||||
def iterative_dependency_wait_step
|
||||
dependency_unfurl = @dependency_waiting_on
|
||||
@dependency_waiting_on = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue