Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24894482
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
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
index 0000000..6225164
--- /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/x-diff
Expires
Wed, Mar 18, 12:52 (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3539862
Default Alt Text
(2 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment