mirror of
				https://github.com/samply/bridgehead.git
				synced 2025-11-04 15:20:17 +01:00 
			
		
		
		
	Update repos on start
When Bridgehead is started, make sure that all repositories are up to date first.
This commit is contained in:
		@@ -89,6 +89,8 @@ case "$ACTION" in
 | 
			
		||||
		loadVars
 | 
			
		||||
		hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
 | 
			
		||||
		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
 | 
			
		||||
                clone_focus_if_nonexistent ${BASE}/..
 | 
			
		||||
                build_focus ${BASE}/..
 | 
			
		||||
 
 | 
			
		||||
@@ -286,6 +286,7 @@ function build_transfair() {
 | 
			
		||||
    # 2. There is no data lock file (which means that no ETL has yet been run).
 | 
			
		||||
    if ls ../ecdc/data/*.[cC][sS][vV] 1> /dev/null 2>&1 && [ ! -f ../ecdc/data/lock ]; then
 | 
			
		||||
        cd $base_dir/transfair
 | 
			
		||||
	git pull
 | 
			
		||||
        docker build --progress=plain -t samply/transfair --no-cache .
 | 
			
		||||
        cd -
 | 
			
		||||
    fi
 | 
			
		||||
@@ -295,6 +296,7 @@ function build_focus() {
 | 
			
		||||
    local base_dir="$1"
 | 
			
		||||
 | 
			
		||||
    cd $base_dir/focus
 | 
			
		||||
    git pull
 | 
			
		||||
    docker build --progress=plain -f DockerfileWithBuild -t samply/focus --no-cache .
 | 
			
		||||
    cd -
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user