Skip to content

Commit

Permalink
Move mooodle-local_ci dependencies to normal
Browse files Browse the repository at this point in the history
When moodle-plugin-ci was incepted, moodle-local_ci still did
not have its own composer dependencies, so it was just installed
raw (as a "package" repository).

Since then, moodle-local_ci has got its own composer stuff, so
we now can change to install its dependencies "normally".

So, here we are, simply, switching from a "package" repository
to a "vcs" one. Pointing to the v1.0.21 release that is the
first supporting installation as a dependency.

And then, removing the annoying @composer update that was executed
in the post-x steps of composer, not needed anymore.

For more information, this issue contains all the related events:

moodlehq/moodle-local_ci#280
  • Loading branch information
stronk7 committed Sep 2, 2023
1 parent d76fc0d commit 0ae91b6
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 18 deletions.
15 changes: 3 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,8 @@
},
"repositories": [
{
"type": "package",
"package": {
"name": "moodlehq/moodle-local_ci",
"version": "1.0.17",
"source": {
"url": "https://github.com/moodlehq/moodle-local_ci.git",
"type": "git",
"reference": "v1.0.17"
}
}
"type": "vcs",
"url": "https://github.com/moodlehq/moodle-local_ci.git"
},
{
"type": "package",
Expand All @@ -64,7 +56,7 @@
"require": {
"php": ">=7.0.8",
"moodlehq/moodle-cs": "^3.3.3",
"moodlehq/moodle-local_ci": "^1.0.17",
"moodlehq/moodle-local_ci": "^1.0.21",
"moodlehq/moodle-local_moodlecheck": "^1.1.4",
"sebastian/phpcpd": "^3.0",
"sebastian/version": "^2.0.1",
Expand Down Expand Up @@ -114,7 +106,6 @@
"post-update-cmd": "@local-ci-install",
"post-create-project-cmd": "@local-ci-install",
"local-ci-install": [
"@composer update --prefer-dist --optimize-autoloader --working-dir=vendor/moodlehq/moodle-local_ci",
"cd vendor/moodlehq/moodle-local_ci && npm install --no-progress"
]
}
Expand Down
88 changes: 83 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).

## [Unreleased]
### Changed
- Modified `moodle-local_ci` composer dependencies and manage them normally, removing some ancient bits that have [stopped working with Composer 2.6.0 and up](https://github.com/composer/composer/issues/11613).
- Updated project dependencies to current [moodle-local_ci](https://github.com/moodlehq/moodle-local_ci) version.

## [3.4.12] - 2023-05-03
### Changed
Expand Down
2 changes: 1 addition & 1 deletion tests/FileUpdatesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class FileUpdatesTest extends \PHPUnit\Framework\TestCase
public function testLocalCIPackageJSON()
{
$this->assertSame(
'060fde69ff2cc75b70fe560c998735b80e2e0942',
'4b37d67998dd06d21c89865641135ed435baf65d',
sha1_file(__DIR__.'/../vendor/moodlehq/moodle-local_ci/package.json'),
'Check changes to vendor/moodlehq/moodle-local_ci/package.json and update MustacheCommand, etc if necessary'
);
Expand Down

0 comments on commit 0ae91b6

Please sign in to comment.