Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12337057
D3807.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D3807.diff
View Options
diff --git a/roles/devserver/userland-home/files/dereckson/bin/mw-update b/roles/devserver/userland-home/files/dereckson/bin/mw-update
new file mode 100755
--- /dev/null
+++ b/roles/devserver/userland-home/files/dereckson/bin/mw-update
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# MediaWiki :: update core
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: Update core and reapply kludge to load ext/skins
+# License: BSD-2-Clause
+# Source file: roles/devserver/userland-home/files/dereckson/bin/mw-update
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+set -e
+
+rootdir=/var/51-wwwroot/mediawiki-dereckson
+cd $rootdir/core
+
+# -------------------------------------------------------------
+# Ensure we're in the default branch
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
+DEFAULT_BRANCH=$(git get-default-branch)
+
+if [ "$CURRENT_BRANCH" != "$DEFAULT_BRANCH" ]; then
+ echo "You need to switch to the $DEFAULT_BRANCH branch to update MediaWiki." >&2
+ exit 1
+fi
+
+# -------------------------------------------------------------
+# Unlink symlinks and stash
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+rm extensions skins
+git stash
+
+# -------------------------------------------------------------
+# Update
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+git pull
+
+# -------------------------------------------------------------
+# Relink
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+rm -rf extensions skins
+ln -s ../extensions .
+ln -s ../skins .
+
+# -------------------------------------------------------------
+# Try auto-update
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+composer update
+(cd maintenance && php run.php update.php)
+
+# -------------------------------------------------------------
+# Present next steps
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+git stash show
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 27, 00:01 (16 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3108245
Default Alt Text
D3807.diff (2 KB)
Attached To
Mode
D3807: Update MediaWiki development sandbox
Attached
Detach File
Event Timeline
Log In to Comment