Page MenuHomeDevCentral

D3807.diff
No OneTemporary

D3807.diff

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

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)

Event Timeline