From: Chris Koeritz Date: Thu, 9 Nov 2017 23:10:23 +0000 (-0500) Subject: Merge branch 'master' of feistymeow.org:feisty_meow into development X-Git-Tag: 2.140.90~6^2 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=f92dc724de5001eab49e02731e9b81c91fc43753;hp=931c5cb63fa4cd34379d0c010aaee18ad9909d8b;p=feisty_meow.git Merge branch 'master' of feistymeow.org:feisty_meow into development --- diff --git a/scripts/about_scripts.txt b/scripts/about_scripts.txt index 274bd0bd..51fe3f55 100644 --- a/scripts/about_scripts.txt +++ b/scripts/about_scripts.txt @@ -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. diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 0c25692a..be183ae1 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -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. diff --git a/scripts/site_avenger/avcoreup.sh b/scripts/site_avenger/avcoreup.sh index 6462dea2..f7594949 100644 --- a/scripts/site_avenger/avcoreup.sh +++ b/scripts/site_avenger/avcoreup.sh @@ -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" diff --git a/scripts/site_avenger/config/default.app b/scripts/site_avenger/config/default.app index 4036883e..65e782d7 100644 --- a/scripts/site_avenger/config/default.app +++ b/scripts/site_avenger/config/default.app @@ -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 + #### diff --git a/scripts/site_avenger/powerup.sh b/scripts/site_avenger/powerup.sh index a72e06f1..998fcad5 100644 --- a/scripts/site_avenger/powerup.sh +++ b/scripts/site_avenger/powerup.sh @@ -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" diff --git a/scripts/site_avenger/sitepush.sh b/scripts/site_avenger/sitepush.sh index b2a7de2d..79156ea2 100644 --- a/scripts/site_avenger/sitepush.sh +++ b/scripts/site_avenger/sitepush.sh @@ -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" diff --git a/scripts/site_avenger/siteup.sh b/scripts/site_avenger/siteup.sh index 826d7d03..a63744be 100644 --- a/scripts/site_avenger/siteup.sh +++ b/scripts/site_avenger/siteup.sh @@ -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" diff --git a/scripts/site_avenger/standup.sh b/scripts/site_avenger/standup.sh index 3bb327f2..762bd1ef 100644 --- a/scripts/site_avenger/standup.sh +++ b/scripts/site_avenger/standup.sh @@ -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. diff --git a/scripts/site_avenger/teardown.sh b/scripts/site_avenger/teardown.sh index c992c4fa..b72aa8e0 100644 --- a/scripts/site_avenger/teardown.sh +++ b/scripts/site_avenger/teardown.sh @@ -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? +