Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56331157
mw-update
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
mw-update
View Options
#!/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-shellscript
Expires
Sat, Nov 7, 03:05 (12 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4207263
Default Alt Text
mw-update (2 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment