From: Chris Koeritz Date: Fri, 18 May 2018 20:11:22 +0000 (-0400) Subject: fix for git puffing and add date in SA scripts X-Git-Tag: 2.140.112^2~34 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=5c0de3a39b1c7e2d127c1441e97e9134a84e5dd8;p=feisty_meow.git fix for git puffing and add date in SA scripts the puff out list method was being overused and causing multiple loops in some places of checkin in folders. hopefully fixed. added a timestamp on all the lines logged to the log file by site avenger scripts. --- diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 355fd5e3..b96bcb34 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -129,7 +129,7 @@ function do_checkin() fi # a new set of steps we have to take to make sure the branch integrity is good. - puff_out_list "$(\pwd)" + do_careful_git_update "$(\pwd)" # we continue on to the push, even if there were no changes this time, because # there could already be committed changes that haven't been pushed yet. diff --git a/scripts/site_avenger/config/default.app b/scripts/site_avenger/config/default.app index 3690e0e5..9e74f0a6 100644 --- a/scripts/site_avenger/config/default.app +++ b/scripts/site_avenger/config/default.app @@ -43,20 +43,20 @@ export DISTRO="ubuntu" export APPLICATION_NAME="${app_dirname}" -echo app name was computed as $APPLICATION_NAME >> "$SSM_LOG_FILE" +echo "$(date_stringer): app name was computed as $APPLICATION_NAME" >> "$SSM_LOG_FILE" # change this if the site is on the "real" internet. export DOMAIN_NAME="${app_dirname}.vm" -echo domain name was computed as $DOMAIN_NAME >> "$SSM_LOG_FILE" +echo "$(date_stringer): domain name was computed as $DOMAIN_NAME" >> "$SSM_LOG_FILE" export REPO_NAME="${app_dirname}" -echo repo name was computed as $REPO_NAME >> "$SSM_LOG_FILE" +echo "$(date_stringer): repo name was computed as $REPO_NAME" >> "$SSM_LOG_FILE" export THEME_NAME="$(capitalize_first_char "${app_dirname}")" -echo theme name was computed as $THEME_NAME >> "$SSM_LOG_FILE" +echo "$(date_stringer): theme name was computed as $THEME_NAME" >> "$SSM_LOG_FILE" #### diff --git a/scripts/site_avenger/config/ecocor6.app b/scripts/site_avenger/config/ecocor6.app index da4741fd..a2d80ecd 100644 --- a/scripts/site_avenger/config/ecocor6.app +++ b/scripts/site_avenger/config/ecocor6.app @@ -4,6 +4,6 @@ export THEME_NAME="Ecocor" -echo "*** overrode THEME_NAME as: $THEME_NAME" >> "$SSM_LOG_FILE" +echo "$(date_stringer): *** overrode THEME_NAME as: $THEME_NAME" >> "$SSM_LOG_FILE" diff --git a/scripts/site_avenger/config/mapsdemo.app b/scripts/site_avenger/config/mapsdemo.app index fb285625..06de0e6e 100644 --- a/scripts/site_avenger/config/mapsdemo.app +++ b/scripts/site_avenger/config/mapsdemo.app @@ -5,5 +5,5 @@ export DOMAIN_NAME="${APPLICATION_NAME}.cakelampvm.com" -echo "*** overrode domain name as: $DOMAIN_NAME" >> "$SSM_LOG_FILE" +echo "$(date_stringer): *** overrode domain name as: $DOMAIN_NAME" >> "$SSM_LOG_FILE" diff --git a/scripts/site_avenger/shared_site_mgr.sh b/scripts/site_avenger/shared_site_mgr.sh index 4f18ffcb..a6803b21 100644 --- a/scripts/site_avenger/shared_site_mgr.sh +++ b/scripts/site_avenger/shared_site_mgr.sh @@ -18,8 +18,8 @@ export SSM_LOG_FILE="$TMP/$(logname)-siteavenger-script.log" export SITE_MANAGEMENT_CONFIG_FILE if [ -z "$SITE_MANAGEMENT_CONFIG_FILE" ]; then SITE_MANAGEMENT_CONFIG_FILE="$WORKDIR/config/default.app" - echo "Site management config file was not set. Using default:" >> "$SSM_LOG_FILE" - echo " $SITE_MANAGEMENT_CONFIG_FILE" >> "$SSM_LOG_FILE" + echo "$(date_stringer): Site management config file was not set. Using default:" >> "$SSM_LOG_FILE" + echo "$(date_stringer): $SITE_MANAGEMENT_CONFIG_FILE" >> "$SSM_LOG_FILE" fi # load in at least the default version to get us moving. @@ -34,7 +34,7 @@ function check_apps_root() { local appdir="$1"; shift if [ ! -d "$appdir" ]; then - echo "Creating the apps directory: $appdir" >> "$SSM_LOG_FILE" + echo "$(date_stringer): Creating the apps directory: $appdir" >> "$SSM_LOG_FILE" mkdir "$appdir" test_or_die "Making apps directory when not already present" fi @@ -46,10 +46,10 @@ function locate_config_file() local app_dirname="$1"; shift local configfile="$WORKDIR/config/${app_dirname}.app" - echo "config file guessed?: $configfile" >> "$SSM_LOG_FILE" + echo "$(date_stringer): config file guessed?: $configfile" >> "$SSM_LOG_FILE" if [ ! -f "$configfile" ]; then # this is not a good config file. we can't auto-guess the config. - echo -e " + echo -e "$(date_stringer): There is no specific site configuration file in: $configfile We will continue onward using the default and hope that this project follows @@ -131,7 +131,7 @@ function test_app_folder() local combo="$appsdir/$dir" if [ ! -d "$combo" ]; then - echo "Creating app directory: $combo" >> "$SSM_LOG_FILE" + echo "$(date_stringer): Creating app directory: $combo" >> "$SSM_LOG_FILE" mkdir "$combo" test_or_die "Making application directory when not already present" fi @@ -186,8 +186,8 @@ function update_repo() local repo_root="$1"; shift local repo_name="$1"; shift -echo here are parms in update repo: >> "$SSM_LOG_FILE" -var full_app_dir checkout_dirname repo_root repo_name >> "$SSM_LOG_FILE" +echo "$(date_stringer): here are parms in update repo:" >> "$SSM_LOG_FILE" +echo "$(date_stringer): $(var full_app_dir checkout_dirname repo_root repo_name)" >> "$SSM_LOG_FILE" # forget any prior value, since we are going to validate the path. unset site_store_path @@ -373,12 +373,12 @@ function fix_appdir_ownership() # go with the default user running the script. user_name="$USER" if [ ! -z "$user_name" -a "$user_name" != "root" ]; then - echo "Chowning the app folder to be owned by: $user_name" >> "$SSM_LOG_FILE" + echo "$(date_stringer): Chowning the app folder to be owned by: $user_name" >> "$SSM_LOG_FILE" #hmmm: have to hope for now for standard group named after user sudo chown -R "$user_name:$user_name" "$combo" test_or_die "Chowning $combo to be owned by $user_name" else - echo "user name failed checks for chowning, was found as '$user_name'" >> "$SSM_LOG_FILE" + echo "$(date_stringer): user name failed checks for chowning, was found as '$user_name'" >> "$SSM_LOG_FILE" fi #