Skip to content

Commit 66a1aad

Browse files
committed
Merge branch '12.x' of https://github.com/SU-SWS/stanford_profile into 6.x
2 parents 4346149 + f5cf392 commit 66a1aad

File tree

297 files changed

+10645
-16025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+10645
-16025
lines changed

.codeclimate.yml

Lines changed: 0 additions & 125 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"name": "CardinalSites",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "web",
5+
"forwardPorts": [
6+
80
7+
],
8+
"portsAttributes": {
9+
"80": {
10+
"label": "Web"
11+
}
12+
},
13+
"onCreateCommand": ".devcontainer/on-create.sh",
14+
"postCreateCommand": ".devcontainer/post-create.sh",
15+
"secrets": {
16+
"SSH_PRIVATE_KEY": {
17+
"description": "SSH Private key for connecting to remote services. Use a password-less ssh: `cat id_rsa | base64 -w 0`."
18+
},
19+
"GITCONFIG": {
20+
"description": "SSH Private key for connecting to remote services. `cat ~/.gitconfig | base64 -w 0`"
21+
}
22+
},
23+
"customizations": {
24+
"vscode": {
25+
"settings": {
26+
"breadcrumbs.enabled": true,
27+
"css.validate": true,
28+
"diffEditor.ignoreTrimWhitespace": false,
29+
"editor.tabSize": 2,
30+
"editor.autoIndent": "full",
31+
"editor.insertSpaces": true,
32+
"editor.formatOnPaste": true,
33+
"editor.formatOnSave": false,
34+
"editor.renderWhitespace": "boundary",
35+
"editor.wordWrapColumn": 80,
36+
"editor.wordWrap": "off",
37+
"editor.detectIndentation": true,
38+
"editor.rulers": [
39+
80
40+
],
41+
"files.associations": {
42+
"*.inc": "php",
43+
"*.module": "php",
44+
"*.install": "php",
45+
"*.theme": "php",
46+
"*.profile": "php",
47+
"*.test": "php",
48+
"*.php": "php",
49+
"*.info": "ini"
50+
},
51+
"files.trimTrailingWhitespace": true,
52+
"files.restoreUndoStack": false,
53+
"files.insertFinalNewline": true,
54+
"html.format.enable": true,
55+
"html.format.wrapLineLength": 80,
56+
"telemetry.telemetryLevel": "off",
57+
/* PHP Intelephense (bmewburn.vscode-intelephense-client) */
58+
"intelephense.environment.includePaths": [
59+
"core/",
60+
"core/includes",
61+
"../vendor/"
62+
]
63+
},
64+
"extensions": {
65+
"recommendations": [
66+
"bmewburn.vscode-intelephense-client",
67+
"dbaeumer.vscode-eslint",
68+
"duboiss.sf-pack",
69+
"eduardgenzora.symfony-service-locator",
70+
"formulahendry.vscode-mysql",
71+
"george-alisson.html-preview-vscode",
72+
"ikappas.composer",
73+
"marcostazi.vs-code-drupal",
74+
"mblode.twig-language-2",
75+
"mehedidracula.php-namespace-resolver",
76+
"mohd-akram.vscode-html-format",
77+
"mrmlnc.vscode-apache",
78+
"nadim-vscode.symfony-code-snippets",
79+
"nadim-vscode.twig-code-snippets",
80+
"phproberto.vscode-php-getters-setters",
81+
"redhat.vscode-yaml",
82+
"stanislav.vscode-drupal",
83+
"thenouillet.symfony-vscode"
84+
]
85+
}
86+
}
87+
}
88+
}

.devcontainer/docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
web:
3+
image: "pookmish/drupal8ci:php8.3"
4+
mysql:
5+
image: "mysql:8.0"
6+
command: --max_allowed_packet=67108864
7+
environment:
8+
MYSQL_DATABASE: drupal
9+
MYSQL_USER: drupal
10+
MYSQL_PASSWORD: drupal
11+
MYSQL_ROOT_PASSWORD: drupal
12+
ports:
13+
- '33306:3306'

.devcontainer/drush.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
command:
2+
sws:
3+
options:
4+
db-port: 3306
5+
db-host: mysql
6+
db-user: drupal
7+
db-pass: drupal
8+
db-name: drupal
9+
user:
10+
login:
11+
options:
12+
uri: default

.devcontainer/on-create.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -ev
4+
set -o xtrace
5+
6+
PACKAGE=`cat composer.json | jq -r '.name'`
7+
PROFILE_NAME=`ls | grep info.yml | sed 's/\.info\.yml//'`
8+
PROFILE_BRANCH=`git rev-parse --abbrev-ref HEAD`
9+
10+
chown -R www-data:www-data /tmp
11+
rm -rf /var/www/html
12+
git clone --branch 2.x https://github.com/SU-SWS/acsf-cardinalsites-public.git /workspaces/html
13+
ln -snf /workspaces/html /var/www/html
14+
15+
cp .devcontainer/drush.yml /var/www/html/drush/local.drush.yml
16+
17+
cd /var/www/html
18+
composer require "$PACKAGE:dev-$PROFILE_BRANCH || $PROFILE_BRANCH-dev" --no-update &&
19+
composer update --no-interaction
20+
rm -rf docroot/*/custom/*
21+
composer install --prefer-source --no-interaction
22+
23+
drush sws:multisite:settings
24+
sed -i "s|uri:.*$|uri: https://$CODESPACE_NAME-80.app.github.dev|" docroot/sites/default/local.drush.yml
25+
sed -i "s|uri:.*$|uri: https://$CODESPACE_NAME-80.app.github.dev|" drush/local.drush.yml
26+
27+
cp .gitpod/global.settings.php docroot/sites/settings/global.settings.php
28+
cp .gitpod/default.local.services.yml docroot/sites/local.services.yml
29+
30+
drush site-install $PROFILE_NAME -y -v
31+
drush cset stage_file_proxy.settings origin 'localhost' -y

.devcontainer/post-create.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -ev
4+
set -o xtrace
5+
6+
PROFILE_NAME=`ls | grep info.yml | sed 's/\.info.*//'`
7+
8+
rm -rf /workspaces/html/docroot/profiles/custom/$PROFILE_NAME
9+
ln -snf /workspaces/$PROFILE_NAME /workspaces/html/docroot/profiles/custom/$PROFILE_NAME
10+
11+
if [[ ! -z $SSH_PRIVATE_KEY ]]; then
12+
mkdir -p ~/.ssh
13+
echo $SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_rsa
14+
chmod 600 ~/.ssh/id_rsa
15+
fi
16+
if [[ ! -z $GITCONFIG ]]; then
17+
echo $GITCONFIG | base64 -d > ~/.gitconfig
18+
chmod 644 ~/.gitconfig
19+
fi
20+
21+
cd /workspaces/html && drush uli
22+

0 commit comments

Comments
 (0)