jenkins-bot has submitted this change and it was merged.

Change subject: Cachedpage.sh adjustments
......................................................................


Cachedpage.sh adjustments

* Special pages are not effected by html caching so do not bother generate
a special cached page
* Allow developer to provide a different article other than Main Page via
the second argument

Change-Id: I7f08008a029506844e6c85a99bc8faf889b1adc6
---
M scripts/cachedpage.sh
1 file changed, 4 insertions(+), 5 deletions(-)

Approvals:
  awjrichards: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/cachedpage.sh b/scripts/cachedpage.sh
index 638de95..01ddb21 100755
--- a/scripts/cachedpage.sh
+++ b/scripts/cachedpage.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-#usage ./scripts/cachedpage.sh 1bd5bc53ebb04fff7f508712a29fdf1f1d7fe14f
+#usage ./scripts/cachedpage.sh 1bd5bc53ebb04fff7f508712a29fdf1f1d7fe14f 
San_Francisco
 
 if
 ! git diff --exit-code --quiet # check for unstaged changes
@@ -22,21 +22,20 @@
 #Generate the 'cached' pages
 mkdir -p tmp
 URL=${MEDIAWIKI_URL:-"http://127.0.0.1:80"}
+TITLE=${2:="Main_Page"}
 echo "Using $URL as a development environment host."
 echo "To specify a different host set MEDIAWIKI_URL environment variable"
 echo '(e.g. by running "export MEDIAWIKI_URL=http://localhost:8080/w";)'
-wget "$URL/index.php/Main_Page?useformat=mobile" -O tmp/cached.html
-wget "$URL/index.php/Special:MobileOptions?useformat=mobile" -O 
tmp/cached_special.html
+wget "$URL/index.php/$TITLE?useformat=mobile" -O tmp/cached.html
 
 #Return to previous branch
 git checkout $cur_branch
 
 # Print location of urls
 echo
-echo Cached pages generated at following locations
+echo Cached page generated at following locations
 echo
 echo \* $URL/extensions/MobileFrontend/tmp/cached.html
-echo \* $URL/extensions/MobileFrontend/tmp/cached_special.html
 
 if [ $stashed_changes ]
 then

-- 
To view, visit https://gerrit.wikimedia.org/r/62185
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f08008a029506844e6c85a99bc8faf889b1adc6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to