Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace composer.canasta.json with YAML additions #463

Merged
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
APACHE_LOG_DIR=/var/log/apache2

# System setup
RUN set x; \

Check failure on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`

Check failure on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`

Check failure on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`.Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
apt-get clean \
&& apt-get update \
&& apt-get install -y aptitude \
Expand Down Expand Up @@ -91,7 +91,7 @@
&& mkdir -p $MW_VOLUME

# Composer
RUN set -x; \

Check failure on line 94 in Dockerfile

View workflow job for this annotation

GitHub Actions / test

DL4001 warning: Either use Wget or Curl but not both
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& composer self-update 2.1.3

Expand Down Expand Up @@ -126,12 +126,6 @@
RUN set -x; \
sed -i 's="monolog/monolog": "2.2.0",="monolog/monolog": "^2.2",=g' $MW_HOME/composer.json

# Composer dependencies
COPY _sources/configs/composer.canasta.json $MW_HOME/composer.local.json
RUN set -x; \
cd $MW_HOME \
&& composer update --no-dev

# Other patches

# Cleanup all .git leftovers
Expand Down
29 changes: 0 additions & 29 deletions _sources/configs/composer.canasta.json

This file was deleted.

42 changes: 42 additions & 0 deletions _sources/configs/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# extension with that name is used, and the default branch used is REL1_39.
# Where the repository *is* specified, the default branch used is master.
extensions:
- AbuseFilter:
bundled: true
additional steps:
- composer update
- AdminLinks:
branch: master
commit: 3e2671c21fd4b8644552069ee60220035b6e96f5 # v. 0.6.1
Expand All @@ -12,6 +16,8 @@ extensions:
commit: 8429d8d4cba5be6df04e3fec17b0daabbf10cfa7
- AntiSpoof:
commit: 01cf89a678d5bab6610d24e07d3534356a5880cb
additional steps:
- composer update
- ApprovedRevs:
branch: master
commit: 53b67bf7e1e8ac3d20c2fd41ad2ab1c708c045a6 # v. 1.8.2
Expand All @@ -25,6 +31,8 @@ extensions:
- BootstrapComponents:
repository: https://github.com/oetterer/BootstrapComponents
commit: 665c3dee1d9e3f4bcb18dd1920fe27b70e334574 # v. 5.1.0
additional steps:
- composer update
- BreadCrumbs2:
commit: d53357a6839e94800a617de4fc451b6c64d0a1c8
- Cargo:
Expand All @@ -36,6 +44,8 @@ extensions:
commit: 9e2b6d3e928855247700146273d8131e025de918
- CirrusSearch:
commit: 8296300873aaffe815800cf05c84fa04c8cbd2c0
additional steps:
- composer update
- CodeMirror:
commit: 27efed79972ca181a194d17f4a94f4192fd5a493
- Collection:
Expand All @@ -54,6 +64,8 @@ extensions:
commit: bc991e93133bd69fe45e07b3d4554225decc7dae
- DataTransfer:
commit: 2f9f949f71f0bb7d1bd8b6b97c795b9428bb1c71
additional steps:
- composer update
- DeleteBatch:
commit: 82078d60fc59a718f429ddebe5e99de8a8734413
- Description2:
Expand All @@ -72,6 +84,8 @@ extensions:
commit: 41544ffceb1356f91575dc6772a48b172751d7cc
- Elastica:
commit: e4ead38b71ed4f3df8dc689fe448b749771b4ed4
additional steps:
- composer update
- EmailAuthorization:
commit: 2016da1b354f741d89b5dc207d4a84e11ffe9bce
- EmbedVideo:
Expand All @@ -92,6 +106,8 @@ extensions:
- GoogleAnalyticsMetrics:
branch: master
commit: 82a08cc63ec58698f144be7c2fb1a6f861cb57bd
additional steps:
- composer update
- GoogleDocCreator:
commit: 9e53ecfa4149688a2352a7898c2a2005632e1b7d
- Graph:
Expand Down Expand Up @@ -139,10 +155,14 @@ extensions:
- Maps:
repository: https://github.com/ProfessionalWiki/Maps
commit: 7175b47e3b2cbbfcd55c6bd896f4e8403dc03d33
additional steps:
- composer update
- MassMessage:
commit: d6a86291bb975c3dc7778f370006f1145cc834bd
- MassMessageEmail:
commit: bd1f3413dbe8242b4294892a7f9803ea22364eae
additional steps:
- composer update
- MediaUploader:
commit: 1edd91c506c1c0319e7b9a3e71d639130760b1fd
- Mermaid:
Expand All @@ -161,10 +181,16 @@ extensions:
commit: 206f32880fa7bf70b191d33ed80b8626bca39efe
- NumerAlpha:
commit: 93c0869735581006a3f510096738e262d49f4107
- OATHAuth:
bundled: true
additional steps:
- composer update
- OpenGraphMeta:
commit: d319702cd4ceda1967c233ef8e021b67b3fc355f
- OpenIDConnect:
commit: f193befe9d66249e694fcdaa7b1b2afbf4a2ffde
additional steps:
- composer update
- PageExchange:
commit: 28482410564e38d2b97ab7321e99c4281c6e5877
- PageForms:
Expand All @@ -190,6 +216,8 @@ extensions:
commit: 87a69003743f1de52338f4717cfcf5218ca5a743
patches:
- semantic-breadcrumb-links-composer-reqs.patch
additional steps:
- composer update
- SemanticCompoundQueries:
repository: https://github.com/SemanticMediaWiki/SemanticCompoundQueries
commit: eeb514393fdf2e80ae7084839d8803ee32ae3da4 # v. 2.2.0
Expand All @@ -212,11 +240,15 @@ extensions:
commit: b5e2afe11991fe21a335cb90426de24b85bc9fe7 # v. 4.1.3
persistent-directories:
- config
additional steps:
- composer update
- SemanticResultFormats:
repository: https://github.com/SemanticMediaWiki/SemanticResultFormats
commit: d5196722a56f9b65475be68d1e97063d7b975cb9 # v. 4.0.2
patches:
- semantic-result-formats-composer-reqs.patch
additional steps:
- composer update
- SemanticScribunto:
repository: https://github.com/SemanticMediaWiki/SemanticScribunto
commit: 1c616a4c4da443b3433000d6870bb92c184236fa # v. 2.2.0
Expand All @@ -230,6 +262,8 @@ extensions:
commit: ecea17097874d16cd240ce35bd20692a67c5064b # v. 1.3.0
patches:
- SemanticWatchList.417851c22c25f3e33fb654f4138c760c53051b9a.patch
additional steps:
- composer update
- SimpleBatchUpload:
repository: https://github.com/ProfessionalWiki/SimpleBatchUpload
commit: 3b9e248b49d7fbeb81d7da32078db7040809e724 # v. 2.0.0
Expand All @@ -251,12 +285,16 @@ extensions:
commit: 8af94cedc41cbe6c54614714ced6ce4128555ce4
- TemplateStyles:
commit: 2a93b56e370ab8b8e020ed29c507104b56f1d11a
additional steps:
- composer update
- TemplateWizard:
commit: d486e3475f84118fd9b5c77d60254daa2f56f654
- Thanks:
commit: 03b6a52f263604c819e69b78c157f6ef5adb053e
- TimedMediaHandler:
commit: 2e64302c68e58693650e91b7869fa5aecf1aaf23
additional steps:
- composer update
- TinyMCE:
commit: 06436ec3a53c6cd53c458e4e8ab3ec8d1a23029b
- TitleIcon:
Expand Down Expand Up @@ -294,7 +332,11 @@ extensions:
commit: 197d429f971b2aebbce29b7a91a194e1f8181e64
persistent-directories:
- compiled_templates
additional steps:
- composer update
- WikiSEO:
commit: 610cffa3345333b53d4dda7b55b2012fbfcee9de
- WSOAuth:
commit: e549b520c2916322323fe83f6b792c013043f61d
additional steps:
- composer update
2 changes: 2 additions & 0 deletions _sources/configs/skins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ skins:
- chameleon:
commit: f34a56528ada14ac07e1b03beda41f775ef27606 # v. 4.2.1
repository: https://github.com/ProfessionalWiki/chameleon
additional steps:
- composer update
- CologneBlue:
commit: 4d588eb78d7e64e574f631c5897579537305437d
- Modern:
Expand Down
47 changes: 30 additions & 17 deletions _sources/scripts/extensions-skins.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
$branch = $data['branch'] ?? null;
$patches = $data['patches'] ?? null;
$persistentDirectories = $data['persistent-directories'] ?? null;
$additionalSteps = $data['additional steps'] ?? null;
$bundled = $data['bundled'] ?? false;

if ($persistentDirectories !== null) {
exec("mkdir -p $MW_ORIGIN_FILES/canasta-$type/$name");
Expand All @@ -31,26 +33,37 @@
}
}

$gitCloneCmd = "git clone ";

if ($repository === null) {
$repository = "https://github.com/wikimedia/mediawiki-$type-$name";
if ($branch === null) {
$branch = $MW_VERSION;
$gitCloneCmd .= "--single-branch -b $branch ";
if (!$bundled) {
$gitCloneCmd = "git clone ";

if ($repository === null) {
$repository = "https://github.com/wikimedia/mediawiki-$type-$name";
if ($branch === null) {
$branch = $MW_VERSION;
$gitCloneCmd .= "--single-branch -b $branch ";
}
}
}

$gitCloneCmd .= "$repository $MW_HOME/$type/$name";
$gitCheckoutCmd = "cd $MW_HOME/$type/$name && git checkout -q $commit";

$gitCloneCmd .= "$repository $MW_HOME/$type/$name";
$gitCheckoutCmd = "cd $MW_HOME/$type/$name && git checkout -q $commit";

exec($gitCloneCmd);
exec($gitCheckoutCmd);
exec($gitCloneCmd);
exec($gitCheckoutCmd);

if ($patches !== null) {
foreach ($patches as $patch) {
$gitApplyCmd = "cd $MW_HOME/$type/$name && git apply /tmp/$patch";
exec($gitApplyCmd);
}
}
}

if ($patches !== null) {
foreach ($patches as $patch) {
$gitApplyCmd = "cd $MW_HOME/$type/$name && git apply /tmp/$patch";
exec($gitApplyCmd);
if ($additionalSteps !== null) {
foreach ($steps as $additionalSteps) {
if ($steps === "composer update") {
$composerUpdateCmd = "cd $MW_HOME/$type/$name && composer update --no-dev";
exec($composerUpdateCmd);
}
}
}
}
Expand Down
Loading