You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's quite a bit of duplication across some of our Kaiser projects which check that submodules exist. For example, HATS and HCS both define the following in their kaiser files:
`git submodule status`.lines.each do |line|
# The git-submodule man page says uninitialized submodules are prefixed with a -
# but I found this unreliable. While testing I pressed Control-C in the middle of
# the update command so some submodule would be initialized and others wouldn't.
# After that, the status command had removed the - for every submodule.
# Therefore we just check if there's files in the directory instead.
dir = line.strip.split(' ')[1]
if Dir.empty?(dir)
puts "Found uninitialized git submodule '#{dir}'"
puts "please run 'git submodule update --init --recursive'"
exit 1
end
end
Of course this would tie Kaiser to git but that's maybe not a bad thing. If there is a use-case without git than maybe this could be implemented as a helper method e.g. check_git_submodules!
The text was updated successfully, but these errors were encountered:
rramsden
changed the title
Ability to get gitsubmodules
Ability to check gitsubmodules
Mar 26, 2020
Context
There's quite a bit of duplication across some of our Kaiser projects which check that submodules exist. For example, HATS and HCS both define the following in their kaiser files:
Of course this would tie Kaiser to git but that's maybe not a bad thing. If there is a use-case without git than maybe this could be implemented as a helper method e.g.
check_git_submodules!
The text was updated successfully, but these errors were encountered: