Make 'system_update' more generic
This commit is contained in:
parent
f7b8804c61
commit
881b538dff
19 changed files with 250 additions and 222 deletions
|
|
@ -1,14 +1,9 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// Runtime contains runtime resources to be installed into any instance
|
||||
//go:embed all:runtime
|
||||
var Runtime embed.FS
|
||||
|
||||
// RuntimeDir returns the path to the runtime directory
|
||||
func (cfg Config) RuntimeDir() string {
|
||||
return filepath.Join(cfg.DeployRoot, "runtime")
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
Files in this folder are utility scripts to be used from within individual WissKI instances.
|
||||
They are mounted under runtime/ and should be used with care.
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This utility script can be used to blindly update all dependencies to their latest versions.
|
||||
# It does not perform any checking whatsoever.
|
||||
|
||||
# update the main modules
|
||||
cd /var/www/data/project || exit 1
|
||||
chmod u+rw web/sites/default/
|
||||
composer update
|
||||
|
||||
# update the db
|
||||
drush -y updatedb
|
||||
|
||||
# update the wisski dependencies
|
||||
cd /var/www/data/project/web/modules/contrib/wisski || exit 1
|
||||
composer update
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# read user
|
||||
USER=$1
|
||||
if [ -z "$USER" ]; then
|
||||
echo "Usage: create_admin.sh USERNAME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# read password
|
||||
echo "Enter Password for $USER:"
|
||||
read -s PASS
|
||||
echo "Enter the same password again:"
|
||||
read -s PASS2
|
||||
|
||||
if [ "$PASS" != "$PASS2" ]; then
|
||||
echo "Passwords not equal"
|
||||
exit 1
|
||||
fi;
|
||||
|
||||
# create the user and add the admin role
|
||||
cd /var/www/data/project/
|
||||
drush user:create "$USER" --password="$PASS"
|
||||
drush user-add-role administrator "$USER"
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This utility script can be used to run all cron tasks.
|
||||
|
||||
cd /var/www/data/project || exit 1
|
||||
export PATH=/var/www/data/project/vendor/bin:$PATH
|
||||
|
||||
drush core-cron
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# make a temporary directory and cd into it
|
||||
TEMPDIR=$(mktemp -d)
|
||||
pushd "$TEMPDIR"
|
||||
|
||||
# curl the colorbox zip and unpack it
|
||||
curl -L https://github.com/jackmoore/colorbox/archive/master.zip --output master.zip
|
||||
unzip master.zip
|
||||
|
||||
# make the directory for libraries, and remove the old colorbox installation
|
||||
chmod u+rw /var/www/data/project/web/sites/default/
|
||||
mkdir -p /var/www/data/project/web/sites/default/libraries/
|
||||
rm -rf /var/www/data/project/web/sites/default/libraries/colorbox
|
||||
|
||||
# copy over the new installation
|
||||
mv colorbox-master/ /var/www/data/project/web/sites/default/libraries/colorbox
|
||||
|
||||
# cleanup
|
||||
popd
|
||||
rm -rf "$TEMPDIR"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script can be used to repatch EasyRDF when needed.
|
||||
cd /var/www/data/project/web/modules/contrib/wisski || exit 1
|
||||
EASYRDF_RESPONSE="./vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Response.php"
|
||||
patch -N "$EASYRDF_RESPONSE" < "/patch/easyrdf.patch"
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# This script can be used to repatch EasyRDF when needed.
|
||||
cd /var/www/data/project/web/modules/contrib/wisski/ || exit 1
|
||||
TRIPLESTABCONTROLLER="./wisski_adapter_sparql11_pb/src/Controller/Sparql11TriplesTabController.php"
|
||||
patch -N "$TRIPLESTABCONTROLLER" < "/patch/triples.patch"
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# read user
|
||||
VERSION=$1
|
||||
if [ -z "$VERSION" ]; then
|
||||
echo "Usage: use_wisski.sh VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# update the main modules
|
||||
cd /var/www/data/project
|
||||
chmod u+rw web/sites/default/
|
||||
composer require "drupal/wisski:$VERSION"
|
||||
|
||||
# update the wisski dependencies
|
||||
pushd /var/www/data/project/web/modules/contrib/wisski
|
||||
composer update
|
||||
popd
|
||||
|
||||
# update the db
|
||||
drush -y updatedb
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# temporarily extend permissions
|
||||
chmod 777 web/sites/default
|
||||
chmod 666 web/sites/default/*settings.php
|
||||
chmod 666 web/sites/default/*services.yml
|
||||
|
||||
# update the core itself
|
||||
composer require 'drupal/internal/core-recommended:^9' 'drupal/internal/core-composer-scaffold:^9' 'drupal/internal/core-project-message:^9' --update-with-dependencies --no-update
|
||||
composer update
|
||||
composer require 'drupal/wisski'
|
||||
|
||||
# update requirements for wisski!
|
||||
pushd web/modules/contrib/wisski || exit 1
|
||||
composer update
|
||||
popd || exit 1
|
||||
|
||||
# run the update and clear the cache!
|
||||
drush updatedb --yes
|
||||
# drush cc
|
||||
|
||||
# and reset everything back to normal
|
||||
chmod 755 web/sites/default
|
||||
chmod 644 web/sites/default/*settings.php
|
||||
chmod 644 web/sites/default/*services.yml
|
||||
Loading…
Add table
Add a link
Reference in a new issue