Skip to content

Commit 5e6f111

Browse files
committed
Fix upgrade status error reporting + console messages
1 parent ce2d7c2 commit 5e6f111

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

scripts/makefile/tests.mk

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,16 @@ endif
8888

8989
## Validate drupal-rector
9090
drupalrectorval:
91-
@echo "Drupal-check validation..."
91+
@echo "Drupal Rector validation..."
9292
$(call php, composer install -o)
9393
$(call php, vendor/bin/rector -V)
9494
$(call php, vendor/bin/rector process --dry-run --no-progress-bar web/modules/custom web/themes/custom)
9595

9696
## Validate upgrade-status
9797
upgradestatusval:
9898
ifneq ("$(wildcard rector.yml)","")
99-
@echo "Drupal-check validation..."
100-
$(call php, composer install -o)
101-
$(call php, drush en -y upgrade_status)
102-
$(call php, drush us-a --all --ignore-contrib --ignore-uninstalled)
99+
@echo "Upgrade status validation..."
100+
@$(call php, /bin/sh ./scripts/makefile/upgrade-status-validation.sh)
103101
else
104102
@echo "rector.yml file does not exist"
105103
endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env sh
2+
3+
# Search for no issues message
4+
REPORT=$(drush us-a --all --ignore-contrib --ignore-uninstalled)
5+
IS_VALID=$(echo "$REPORT" | grep "No known issues found.")
6+
7+
# Exit1 and alert if message not found
8+
if [ -z "$IS_VALID" ]; then
9+
printf "There are \033[1mmessage(s)\033[0m in Upgrade Status report to fix :\n"
10+
echo -e "$REPORT"
11+
exit 1
12+
else
13+
echo -e "Status report is valid : No error listed"
14+
exit 0
15+
fi

0 commit comments

Comments
 (0)