Merge branch 'release-2.140.88'
authorChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 23:31:20 +0000 (18:31 -0500)
committerChris Koeritz <fred@gruntose.com>
Thu, 9 Nov 2017 23:33:14 +0000 (18:33 -0500)
merging release 2.140.88 off of development branch into master.

scripts/about_scripts.txt
scripts/rev_control/version_control.sh
scripts/site_avenger/avcoreup.sh
scripts/site_avenger/config/default.app
scripts/site_avenger/powerup.sh
scripts/site_avenger/sitepush.sh
scripts/site_avenger/siteup.sh
scripts/site_avenger/standup.sh
scripts/site_avenger/teardown.sh

index 274bd0bd81413f74026621f1d4295cd9235c5126..51fe3f55efbf81a148c45ea6417fe89be90012b3 100644 (file)
@@ -7,6 +7,6 @@ years).
 all of these scripts were formerly known as "the yeticode collection", and they even
 lived in their own domain yeticode.org.  this was before i stopped buying a new domain
 name on the merest whim.  consolidating them in with the codebase has worked a lot
-better anyhow.  we still love yetis.
+better anyhow.  but we still love yetis.
 
 
index 0c25692aee5a8cb1752a3555bc09e4e28e288d36..be183ae1bf3cf1c82b6250a2c99f4fd95bac53a1 100644 (file)
@@ -82,10 +82,8 @@ function do_checkin()
       retval+=$?
 
       # upload any changes to the upstream repo so others can see them.
-      git push 2>&1 
-#| grep -v "X11 forwarding request failed"
-#have to do pipestatus if want to keep the above.
-      retval+=$?
+      git push 2>&1 | grep -v "X11 forwarding request failed" | squash_first_few_crs
+      retval+=${PIPESTATUS[0]}
     fi
   else
     # nothing there.  it's not an error though.
@@ -211,6 +209,13 @@ function squash_first_few_crs()
   fi
 }
 
+# a helpful method that reports the git branch for the current directory's
+# git repository.
+function git_branch_name()
+{
+  echo "$(git branch | grep \* | cut -d ' ' -f2-)"
+}
+
 # gets the latest versions of the assets from the upstream repository.
 function do_update()
 {
@@ -242,8 +247,15 @@ function do_update()
   elif [ -d ".git" ]; then
     if test_writeable ".git"; then
       $blatt
+      retval=0
+
+      if [ "$(git_branch_name)" != "master" ]; then
+        git pull origin master 2>&1 | grep -v "X11 forwarding request failed" | squash_first_few_crs
+        retval+=${PIPESTATUS[0]}
+      fi
+
       git pull 2>&1 | grep -v "X11 forwarding request failed" | squash_first_few_crs
-      retval=${PIPESTATUS[0]}
+      retval+=${PIPESTATUS[0]}
     fi
   else
     # this is not an error necessarily; we'll just pretend they planned this.
index 6462dea20f0faf3e2a8948a3adbe59ebb00fe3e0..f759494973e4b686b50d8d61807810e89869dfef 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -16,6 +14,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 # check for parameters.
 app_dirname="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 4036883e48a8fb4eb68222fe33bbe2d847c8e2a7..65e782d7b02664a3a08cf7cbf340d564b0a680e7 100644 (file)
@@ -23,14 +23,22 @@ CHECKOUT_DIR_NAME="avenger5"
 
 # deployment information for the application / site.
 
-APPLICATION_NAME="$(basename "$SITE_MANAGEMENT_CONFIG_FILE" .app)"
+APPLICATION_NAME="${app_dirname}"
 
 echo app name was computed as $APPLICATION_NAME
 
 # change this if the site is on the "real" internet.
-DOMAIN_NAME="$(basename "$SITE_MANAGEMENT_CONFIG_FILE" .app).vm"
+DOMAIN_NAME="${app_dirname}.vm"
 
 echo domain name was computed as $DOMAIN_NAME
 
+REPO_NAME="${app_dirname}.git"
+
+echo repo name was computed as $REPO_NAME
+
+THEME_NAME="$(capitalize_first_char "${app_dirname}.git")"
+
+echo theme name was computed as $THEME_NAME
+
 ####
 
index a72e06f19ec982ff5f86d57fbbb499283c2fd922..998fcad57b4aae9517737ab6ea75bacb654b186e 100644 (file)
@@ -22,8 +22,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 function print_instructions()
@@ -53,6 +51,8 @@ if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
 fi
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index b2a7de2dd5f69d96e8b1c945a70493b5fa0aaf5a..79156ea2ac76bb02e1ea1c28e2c0748321a4d552 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -17,6 +15,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 app_dirname="$1"; shift
 repo_name="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 826d7d03370a408ba25b1b918adc4251a738d02c..a63744be2ee02355999c770401ca0c74a3932ded 100644 (file)
@@ -7,8 +7,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 # main body of script.
@@ -17,6 +15,8 @@ source "$WORKDIR/shared_site_mgr.sh"
 app_dirname="$1"; shift
 repo_name="$1"; shift
 
+source "$WORKDIR/shared_site_mgr.sh"
+
 sep
 
 check_application_dir "$APPLICATION_DIR"
index 3bb327f20f87f61ccca2807e3ec0c9107fa084ff..762bd1ef6e8ba20e26e171fa99f7c6757fecbb66 100644 (file)
@@ -8,8 +8,6 @@
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-source "$WORKDIR/shared_site_mgr.sh"
-
 ############################
 
 function print_instructions()
@@ -32,8 +30,12 @@ overridden by setting the SITE_MANAGEMENT_CONFIG_FILE environment variable."
 
 # check for parameters.
 app_dirname="$1"; shift
-repo_name="$1"; shift
-theme_name="$1"; shift
+
+if [ -z "$app_dirname" ]; then
+  print_instructions
+fi
+
+source "$WORKDIR/shared_site_mgr.sh"
 
 if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
@@ -43,6 +45,47 @@ sep
 
 check_application_dir "$APPLICATION_DIR"
 
+add_domain "$DOMAIN_NAME"
+test_or_die "Setting up domain: $DOMAIN_NAME"
+
+add_apache_site "$APPLICATION_NAME" "$DOMAIN_NAME"
+test_or_die "Setting up apache site for: $APPLICATION_NAME"
+
+powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
+
+
+
+
+
+sep
+
+echo "
+Finished standing up the full domain and site in:
+${app_dirname}"
+
+#leave before old crud below
+exit 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#below is probably not needed.
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
   # no dir was passed, so guess it.
index c992c4fa1463e22f17b6cd98f1b4324c320b42b6..b72aa8e0fff5a5e5d1ed7a356262de225604dbb1 100644 (file)
@@ -1,5 +1,12 @@
 #!/bin/bash
 
-# not implemented yet.
+echo "sorry--this script is not implemented yet."
 
 
+
+# need the inverse of add_domain and add_apache_site.
+# can use the same machinery as standup, just need to invoke these two new removal methods.
+
+# the decommissioning of the app is a question though.  we don't want to delete it, i'm pretty sure.
+# so how about that part is to do nothing?
+