mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
Merge pull request #672 from flatcar/krnowak/weekly
bootstrap_sdk: Allow running hooks to modify stage1 repos
This commit is contained in:
commit
e6fab2f30f
@ -158,6 +158,20 @@ stage_repo() {
|
|||||||
&& git fetch --all \
|
&& git fetch --all \
|
||||||
&& git checkout "$gitref" )
|
&& git checkout "$gitref" )
|
||||||
fi
|
fi
|
||||||
|
(
|
||||||
|
set -euo pipefail
|
||||||
|
local repo_var hook name
|
||||||
|
|
||||||
|
# FLAGS_coreos_overlay for gitname coreos-overlay
|
||||||
|
repo_var="FLAGS_${gitname//-/_}"
|
||||||
|
shopt -s nullglob
|
||||||
|
for hook in "${FLAGS_coreos_overlay}/coreos/stage1_hooks/"*"-${gitname}.sh"; do
|
||||||
|
name=${hook##*/}
|
||||||
|
name=${name%"-${gitname}.sh"}
|
||||||
|
info "Invoking stage1 ${gitname} hook ${name} on ${dest}/${repo}"
|
||||||
|
"${hook}" "${dest}/${repo}" "${!repo_var}"
|
||||||
|
done
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
build_stage1() {
|
build_stage1() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user