Skip to content

Commit

Permalink
Change branch
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Mar 15, 2022
1 parent 9835135 commit af0e971
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 130 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ In following snippet, you will have to replace `YOURFORK` and `YOURBRANCH` with

These commands can be used to test it out:

### Change the recipes.php file

If you want to test a specific branch, you have to add it as a version to `recipes.php`.
You could also use the wildcard version:

```php
return [
'phpro/symfony-conventions' => [
'*' => [
'configs/grumphp.yaml' => 'grumphp.yaml.dist',
'configs/.php-cs-fixer.php' => '.php-cs-fixer.php',
],
],
];
```

### Rebuild the recipes and index:
```bash
FLEX_BRANCH=YOURBRANCH FLEX_FORK=YOURFORK php scripts/build-flex.php
Expand Down
7 changes: 3 additions & 4 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"WARNING": "This file is auto-generated and may only be changed by computers!",
"recipes": {
"phpro/symfony-conventions": [
"*",
"1.0"
],
"phpstan/phpstan": [
Expand All @@ -12,11 +11,11 @@
"4.22"
]
},
"branch": "master",
"branch": "main",
"is_contrib": true,
"_links": {
"repository": "github.com/phpro/symfony-conventions",
"origin_template": "{package}:{version}@github.com/phpro/symfony-conventions:master",
"recipe_template": "https://api.github.com/repos/phpro/symfony-conventions/contents/recipes/{package_dotted}.{version}.json?ref=master"
"origin_template": "{package}:{version}@github.com/phpro/symfony-conventions:main",
"recipe_template": "https://api.github.com/repos/phpro/symfony-conventions/contents/recipes/{package_dotted}.{version}.json?ref=main"
}
}
4 changes: 4 additions & 0 deletions recipes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

return [
'phpro/symfony-conventions' => [
/*
* In case you want to test branches:
*
'*' => [
'configs/grumphp.yaml' => 'grumphp.yaml.dist',
'configs/.php-cs-fixer.php' => '.php-cs-fixer.php',
],
*/
'1.0' => [
'configs/grumphp.yaml' => 'grumphp.yaml.dist',
'configs/.php-cs-fixer.php' => '.php-cs-fixer.php',
Expand Down
125 changes: 0 additions & 125 deletions recipes/phpro.symfony-conventions.*.json

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/build-flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
];


$branch = $_SERVER['FLEX_BRANCH'] ?? 'master';
$branch = $_SERVER['FLEX_BRANCH'] ?? 'main';
$fork = $_SERVER['FLEX_FORK'] ?? 'phpro';

$buildIndex = static fn (array $recipes): array => [
Expand Down

0 comments on commit af0e971

Please sign in to comment.