require Nextcloud 25

This commit is contained in:
korelstar 2022-10-03 10:12:22 +02:00
parent 172f96866d
commit e464a7b10d
4 changed files with 7 additions and 8 deletions

View File

@ -67,7 +67,7 @@ jobs:
php-version: ${{ env.PHP_VERSION }} php-version: ${{ env.PHP_VERSION }}
- name: Determine minimum Nextcloud API version - name: Determine minimum Nextcloud API version
if: matrix.version == 'min' if: matrix.version == 'min'
run: echo "NC_API_TAG=^$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV run: echo "NC_API_TAG=dev-stable$(php tests/nextcloud-version.php --appinfo)" >> $GITHUB_ENV
- name: Install Dependencies - name: Install Dependencies
run: | run: |
composer require --dev nextcloud/ocp:$NC_API_TAG composer require --dev nextcloud/ocp:$NC_API_TAG

View File

@ -23,7 +23,7 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www
<screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot> <screenshot small-thumbnail="https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes-thumbnail.jpg">https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png</screenshot>
<dependencies> <dependencies>
<php min-version="7.4" max-version="8.1" /> <php min-version="7.4" max-version="8.1" />
<nextcloud min-version="22" max-version="26" /> <nextcloud min-version="25" max-version="27" />
</dependencies> </dependencies>
<repair-steps> <repair-steps>
<post-migration> <post-migration>

View File

@ -1,6 +1,6 @@
{ {
"require-dev": { "require-dev": {
"nextcloud/ocp": ">=22", "nextcloud/ocp": "dev-stable25@dev",
"nextcloud/coding-standard": "^1.0", "nextcloud/coding-standard": "^1.0",
"friendsofphp/php-cs-fixer": "^3", "friendsofphp/php-cs-fixer": "^3",
"squizlabs/php_codesniffer": "^3", "squizlabs/php_codesniffer": "^3",
@ -13,6 +13,5 @@
"OCA\\Notes\\Tests\\API\\": "tests/api/" "OCA\\Notes\\Tests\\API\\": "tests/api/"
} }
}, },
"minimum-stability": "beta",
"prefer-stable": true "prefer-stable": true
} }

View File

@ -16,9 +16,10 @@ function getNCVersionFromComposer($path) {
$v = getValidProperty($dev, 'nextcloud/ocp'); $v = getValidProperty($dev, 'nextcloud/ocp');
if (substr($v, 0, 1) == '^') { if (substr($v, 0, 1) == '^') {
$v = substr($v, 1); $v = substr($v, 1);
} } elseif (substr($v, 0, 2) == '>=') {
if (substr($v, 0, 2) == '>=') {
$v = substr($v, 2); $v = substr($v, 2);
} elseif (substr($v, 0, 10) == 'dev-stable') {
$v = substr($v, 10);
} }
return $v; return $v;
} }
@ -127,12 +128,11 @@ try {
$vComposer = getNCVersionFromComposer(__DIR__.'/../composer.json'); $vComposer = getNCVersionFromComposer(__DIR__.'/../composer.json');
if ($vComposer === 'dev-master') { if ($vComposer === 'dev-master') {
$vComposer = getNCVersionFromComposerBranchAlias(__DIR__.'/../vendor/nextcloud/ocp/composer.json'); $vComposer = getNCVersionFromComposerBranchAlias(__DIR__.'/../vendor/nextcloud/ocp/composer.json');
$vAppInfo = getDependencyVersionFromAppInfo($pathAppInfo, 'nextcloud', 'max');
$type = 'max'; $type = 'max';
} else { } else {
$vAppInfo = getDependencyVersionFromAppInfo($pathAppInfo, 'nextcloud', 'min');
$type = 'min'; $type = 'min';
} }
$vAppInfo = getDependencyVersionFromAppInfo($pathAppInfo, 'nextcloud', $type);
echo $type.': '.$vAppInfo.' (AppInfo) vs. '.$vComposer.' (Composer) => '; echo $type.': '.$vAppInfo.' (AppInfo) vs. '.$vComposer.' (Composer) => ';
if (versionCompare($vComposer, $vAppInfo, $type)) { if (versionCompare($vComposer, $vAppInfo, $type)) {
echo 'OK'.PHP_EOL; echo 'OK'.PHP_EOL;