From 8d69b8c11d5468cdae029f297a095aba7c893d80 Mon Sep 17 00:00:00 2001 From: dimti Date: Wed, 23 Aug 2023 18:19:54 +0300 Subject: [PATCH] * deactivate unnecessary plugins script moved to local dir + bump script with yarn build example in theme - remove unnecessary ignores --- .gitignore-example | 7 +------ quick/bump.sh.example | 24 ++++++++++++++++++++++ .../deactivate-unnecessary-plugins.sh.example} | 0 quick/settings.sh.example | 2 ++ wp-content/uploads/.gitignore | 2 ++ 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 quick/bump.sh.example rename quick/{deactivate-unnecessary-plugins-on-local-env.sh.example => local/deactivate-unnecessary-plugins.sh.example} (100%) create mode 100644 wp-content/uploads/.gitignore diff --git a/.gitignore-example b/.gitignore-example index 42e063a..0636fbf 100644 --- a/.gitignore-example +++ b/.gitignore-example @@ -41,9 +41,4 @@ /.htaccess # Custom ignores -/*.txt -/serap* -/wp-content/gallery -/antibot8 -/.tmb -/wp-config.bak.php + diff --git a/quick/bump.sh.example b/quick/bump.sh.example new file mode 100644 index 0000000..5a915c5 --- /dev/null +++ b/quick/bump.sh.example @@ -0,0 +1,24 @@ +#!/bin/bash +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +. $SCRIPT_DIR/settings.sh || { + echo "no settings" && exit 1 +} + +VER=$1 + +if [[ -z "$VER" ]]; then + echo "Version not defined in first argument." + exit +fi + +cd "${SCRIPT_DIR}/.." + +git fetch && git checkout $VER + +if [[ `echo $?` -ne 0 ]]; then + echo "Unable to checkout choose tag or branch or error in submodule update command." + exit 1 +fi + +cd "${SCRIPT_DIR}/../wp-content/themes/$THEME/" && yarn && yarn build diff --git a/quick/deactivate-unnecessary-plugins-on-local-env.sh.example b/quick/local/deactivate-unnecessary-plugins.sh.example similarity index 100% rename from quick/deactivate-unnecessary-plugins-on-local-env.sh.example rename to quick/local/deactivate-unnecessary-plugins.sh.example diff --git a/quick/settings.sh.example b/quick/settings.sh.example index 89ffe20..1633afd 100755 --- a/quick/settings.sh.example +++ b/quick/settings.sh.example @@ -8,3 +8,5 @@ export TABLE_PREFIX="wp_" export PROD_DOMAIN=wpstudio.ru export LOCAL_DOMAIN=wpstudio.local.wpstudio.ru + +export THEME=nicol diff --git a/wp-content/uploads/.gitignore b/wp-content/uploads/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/wp-content/uploads/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore