Skip to content

Commit c60904e

Browse files
committed
Merge branch 'release/v1.6.0'
2 parents 18bc92b + 42cad6d commit c60904e

15 files changed

+117
-76
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [1.6.0] - 2020-10-16
10+
### Added
11+
- Added ignore tables option for the main config which is passed to n98-magerun2.
12+
13+
### Changed
14+
- Moved Magento commands over to individual file.
15+
- Unified messaging throughout the app.
16+
17+
918
## [1.5.1] - 2020-10-14
1019
### Fixed
11-
- Incorrect version in the installer
20+
- Incorrect version in the installer.
1221

1322

1423
## [1.5.0] - 2020-10-14

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ local_backup_dir=/opt/magento/backups
4141
local_shared_deployment_dir=/opt/magento/deployment/shared/magento
4242
local_file_user=magento
4343
local_file_group=magento
44+
ignore_tables="mageplaza_smtp_log"
4445
```
4546

db-sync.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ source "${dbsyncutil}menu.sh"
1313

1414
# Make sure we are in a Magento directory
1515
if [ ! -f "bin/magento" ]; then
16-
printf '%-1s %-80s %-1s' "${bg_red}${txt_white}" " " "${txt_end}"
17-
echo -e "${bg_red}${txt_white} You are not currently in a Magento directory ${txt_end}"
18-
echo -e "${bg_red}${txt_white} ${txt_end}"
16+
printf "${bg_red}${txt_white}%-80s${txt_end}\n" " "
17+
printf "${bg_red}${txt_white}%-80s${txt_end}\n" " You are not currently in a Magento directory"
18+
printf "${bg_red}${txt_white}%-80s${txt_end}\n" " "
1919
exit
2020
fi
2121

2222
# Set global paths and functions
2323
source "${dbsyncutil}set_constants.sh"
2424

25-
echo -e "${bg_black}${txt_white} ${txt_end}"
26-
echo -e "${bg_black}${txt_white} Copy over a production database to staging ${txt_end}"
27-
echo -e "${bg_black}${txt_white} ${txt_end}"
25+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " "
26+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " Copy over a production database to staging"
27+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " "
2828

2929
# Check for a local config file
3030
echo -e ""
@@ -83,20 +83,20 @@ while true; do
8383
esac
8484
done
8585

86-
echo -e ""
87-
echo -e "${txt_blue} Run the Magento configuration. ${txt_end}"
88-
echo -e ""
86+
# Run Magento Config
87+
while true; do
88+
echo -e "\n"
89+
read -p "Would you like to run Magento commands? " yn
90+
91+
case $yn in
92+
[Yy]* ) source "${dbsyncutil}magento_config.sh"; break;;
93+
[Nn]* ) break;;
94+
* ) echo "Please answer yes or no.";;
95+
esac
96+
done
8997

90-
n98-magerun setup:upgrade
91-
echo
92-
n98-magerun setup:di:compile
93-
echo
94-
n98-magerun setup:static-content:deploy -f -j8 en_GB en_US
9598
echo
96-
n98-magerun indexer:reindex
99+
printf "${bg_green}${txt_white}%-80s${txt_end}\n" " "
100+
printf "${bg_green}${txt_white}${txt_bold}%-21s ${txt_yellow}%-58s${txt_end}\n" " Database migrated:" "${new_domain}"
101+
printf "${bg_green}${txt_white}%-80s${txt_end}\n" " "
97102
echo
98-
n98-magerun cache:flush
99-
100-
echo -e "${bg_green}${txt_white}${txt_bold} ${txt_end}"
101-
echo -e "${bg_green}${txt_white}${txt_bold} Database migrated: ${txt_yellow}${new_domain} ${txt_end}"
102-
echo -e "${bg_green}${txt_white}${txt_bold} ${txt_end}"

example.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ local_backup_dir=/opt/magento/backups
1010
local_shared_deployment_dir=/opt/magento/deployment/shared/magento
1111
local_file_user=magento
1212
local_file_group=magento
13+
ignore_tables="mageplaza_smtp_log"

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
dbsync_latest_version() {
10-
echo "v1.5.1"
10+
echo "v1.6.0"
1111
}
1212

1313
#

utils/local_backup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
if [ $_arg_local_backup == 'on' ]; then
44
# Backup the current local database
5-
echo -e ""
5+
echo
66
echo -e "${txt_blue} Backing up local database(s).${txt_end}"
7-
echo -e ""
7+
echo
88

9-
n98-magerun --ansi --root-dir="${PWD}" db:dump --compression="gzip" --force "${local_backup_dir}/$DATESTAMP-m2.sql.gz"
9+
n98-magerun --quiet --no-interaction --root-dir="${PWD}" db:dump --compression="gzip" --force "${local_backup_dir}/$DATESTAMP-m2.sql.gz"
1010

1111
if [ $_arg_wordpress == 'on' ]; then
12-
n98-magerun --ansi --root-dir="${PWD}" db:dump --compression="gzip" --connection="wordpress" --force "${local_backup_dir}/$DATESTAMP-wp.sql.gz"
12+
n98-magerun --quiet --no-interaction --root-dir="${PWD}" db:dump --compression="gzip" --connection="wordpress" --force "${local_backup_dir}/$DATESTAMP-wp.sql.gz"
1313
fi
1414
else
1515
# No local backup
16-
echo -e ""
16+
echo
1717
echo -e "${txt_blue} Skipping local database(s) backup.${txt_end}"
18-
echo -e ""
18+
echo
1919
fi

utils/local_imagery_import.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Backup the current local database
4-
echo -e ""
4+
echo
55
echo -e "${txt_blue} Importing imagery from live.${txt_end}"
6-
echo -e ""
6+
echo
77

88
# Set the default directories to transfer
99
source=("/pub/media/" "/wp/wp-content/uploads/")

utils/local_import.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
22

33
# Backup the current local database
4-
echo -e ""
4+
echo
55
echo -e "${txt_blue} Importing into local database(s).${txt_end}"
6-
echo -e ""
6+
echo
77

88
mysql -h$DB_HOST -u$DB_USER -p$DB_PASS $DB_DBASE<$local_backup_dir/latest-m2.sql
99

utils/magento_config.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
echo
4+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " "
5+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " Run the Magento configuration."
6+
printf "${bg_black}${txt_white}%-80s${txt_end}\n" " "
7+
8+
echo
9+
echo -e "${txt_blue} Magento Setup Upgrade. ${txt_end}"
10+
echo
11+
n98-magerun --quiet --no-interaction setup:upgrade
12+
echo
13+
echo -e "${txt_blue} Magento Setup DI Compile. ${txt_end}"
14+
echo
15+
n98-magerun --quiet --no-interaction setup:di:compile
16+
echo
17+
echo -e "${txt_blue} Magento Static Content Deploy. ${txt_end}"
18+
echo
19+
n98-magerun --quiet --no-interaction setup:static-content:deploy -f -j8 en_GB en_US
20+
echo
21+
echo -e "${txt_blue} Magento Reindex. ${txt_end}"
22+
echo
23+
n98-magerun --quiet --no-interaction indexer:reindex
24+
echo
25+
echo -e "${txt_blue} Magento Cache Flush. ${txt_end}"
26+
echo
27+
n98-magerun --quiet --no-interaction cache:flush

utils/menu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
version="1.5.1"
2+
version="1.6.0"
33

44
die()
55
{

0 commit comments

Comments
 (0)