File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 69
69
| Run any update, except for Drupal core | ` bash drupal-update.sh -t all -c false ` |
70
70
| Run minor update, excluding some modules | ` bash drupal-update.sh -e pathauto,redirect ` |
71
71
| Run all updates, saving summary in upgrade.md | ` bash drupal-update.sh -t all -o upgrade.md ` |
72
+
73
+
74
+ Get all minor updates and output results in summary.md file.
75
+ ``` bash
76
+ curl -fsSL https://raw.githubusercontent.com/valicm/drupal-update/main/drupal-update.sh | bash -s -- -o summary.md
77
+ ```
Original file line number Diff line number Diff line change @@ -47,6 +47,11 @@ validate_options() {
47
47
echo " Error: Core flag must be either true or false. Default if empty is false"
48
48
exit_error
49
49
fi
50
+
51
+ if [ -n " $SUMMARY_FILE " ] && [[ " $SUMMARY_FILE " != * .md ]]; then
52
+ echo " Error: Summary output file needs to end with .md extension"
53
+ exit_error
54
+ fi
50
55
}
51
56
52
57
# Validate if all requirements are present.
@@ -156,7 +161,7 @@ UPDATES=$(composer outdated "drupal/*" -f json -D --locked --ignore-platform-req
156
161
for UPDATE in $( echo " ${UPDATES} " | jq -c ' .locked[]' ) ; do
157
162
PROJECT_NAME=$( echo " ${UPDATE} " | jq ' ."name"' | sed " s/\" //g" )
158
163
PROJECT_URL=$( echo " ${UPDATE} " | jq ' ."homepage"' | sed " s/\" //g" )
159
- if [ -n " $PROJECT_URL " ]; then
164
+ if [ -z " $PROJECT_URL " ] || [ " $PROJECT_URL " == null ]; then
160
165
PROJECT_URL=" https://www.drupal.org/project/drupal"
161
166
fi
162
167
CURRENT_VERSION=$( echo " ${UPDATE} " | jq ' ."version"' | sed " s/\" //g" )
You can’t perform that action at this time.
0 commit comments