mirror of https://github.com/samply/bridgehead.git
Deal with multiple data files, update repos
The check for the presence of data in the TransFAIR updating function only worked for single CSV files. Tis commit corrects that. Now also do a git pull on the various repos, to keep things up to date.
This commit is contained in:
parent
70aca8e99c
commit
153f654397
|
@ -89,6 +89,8 @@ case "$ACTION" in
|
||||||
loadVars
|
loadVars
|
||||||
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
||||||
checkRequirements
|
checkRequirements
|
||||||
|
# Note: changes to "bridgehead" script will only take effect after next start.
|
||||||
|
git pull
|
||||||
# Local versions of focus and transfair are needed by EHDS2
|
# Local versions of focus and transfair are needed by EHDS2
|
||||||
clone_focus_if_nonexistent ${BASE}/..
|
clone_focus_if_nonexistent ${BASE}/..
|
||||||
build_focus ${BASE}/..
|
build_focus ${BASE}/..
|
||||||
|
|
|
@ -282,10 +282,11 @@ function build_transfair() {
|
||||||
|
|
||||||
# We only take the touble to build transfair if:
|
# We only take the touble to build transfair if:
|
||||||
#
|
#
|
||||||
# 1. There is no data lock file (which means that no ETL has yet been run) and
|
# 1. There is data available (any CSV files) and
|
||||||
# 2. There is data available.
|
# 2. There is no data lock file (which means that no ETL has yet been run).
|
||||||
if [ -f ../ecdc/data/*.[cC][sS][vV] ] && [ ! -f ../ecdc/data/lock ]; then
|
if ls ../ecdc/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && [ ! -f ../ecdc/data/lock ]; then
|
||||||
cd $base_dir/transfair
|
cd $base_dir/transfair
|
||||||
|
git pull
|
||||||
docker build --progress=plain -t samply/transfair --no-cache .
|
docker build --progress=plain -t samply/transfair --no-cache .
|
||||||
cd -
|
cd -
|
||||||
fi
|
fi
|
||||||
|
@ -295,6 +296,7 @@ function build_focus() {
|
||||||
local base_dir="$1"
|
local base_dir="$1"
|
||||||
|
|
||||||
cd $base_dir/focus
|
cd $base_dir/focus
|
||||||
|
git pull
|
||||||
docker build --progress=plain -f DockerfileWithBuild -t samply/focus --no-cache .
|
docker build --progress=plain -f DockerfileWithBuild -t samply/focus --no-cache .
|
||||||
cd -
|
cd -
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue