Project

General

Profile

Bug #19440

Updated by Peter Amstutz over 1 year ago

Right now it just deletes everything and re-clones. 

 It should be a little bit more clever and if it's already been cloned & at the right commit, it shouldn't do anything. 

 <pre> 
 # Get the formula and dependencies 
 cd ${F_DIR} || exit 1 
 echo "Cloning formulas" 
 rm -rf ${F_DIR}/* || exit 1 
 git clone --quiet https://github.com/saltstack-formulas/docker-formula.git ${F_DIR}/docker 
 ( cd docker && git checkout --quiet tags/"${DOCKER_TAG}" -b "${DOCKER_TAG}" ) 

 echo "...locale" 
 git clone --quiet https://github.com/saltstack-formulas/locale-formula.git ${F_DIR}/locale 
 ( cd locale && git checkout --quiet tags/"${LOCALE_TAG}" -b "${LOCALE_TAG}" ) 

 echo "...nginx" 
 git clone --quiet https://github.com/saltstack-formulas/nginx-formula.git ${F_DIR}/nginx 
 ( cd nginx && git checkout --quiet tags/"${NGINX_TAG}" -b "${NGINX_TAG}" ) 

 echo "...postgres" 
 git clone --quiet https://github.com/saltstack-formulas/postgres-formula.git ${F_DIR}/postgres 
 ( cd postgres && git checkout --quiet tags/"${POSTGRES_TAG}" -b "${POSTGRES_TAG}" ) 

 echo "...letsencrypt" 
 git clone --quiet https://github.com/saltstack-formulas/letsencrypt-formula.git ${F_DIR}/letsencrypt 
 ( cd letsencrypt && git checkout --quiet tags/"${LETSENCRYPT_TAG}" -b "${LETSENCRYPT_TAG}" ) 

 echo "...arvados" 
 git clone --quiet https://git.arvados.org/arvados-formula.git ${F_DIR}/arvados 

 # If we want to try a specific branch of the formula 
 if [ "x${BRANCH}" != "x" ]; then 
   ( cd ${F_DIR}/arvados && git checkout --quiet -t origin/"${BRANCH}" -b "${BRANCH}" ) 
 elif [ "x${ARVADOS_TAG}" != "x" ]; then 
 ( cd ${F_DIR}/arvados && git checkout --quiet tags/"${ARVADOS_TAG}" -b "${ARVADOS_TAG}" ) 
 fi 
 </pre> 

Back