Skip to content

Commit

Permalink
Merge branch '2.0' into 2
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed May 31, 2023
2 parents f003b8d + 8069959 commit a66ac92
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 26 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ on:
push:
pull_request:
workflow_dispatch:
# Every Friday at 12:00pm UTC
schedule:
- cron: '0 12 * * 5'

jobs:
ci:
name: CI
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1
16 changes: 16 additions & 0 deletions .github/workflows/dispatch-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Dispatch CI

on:
# At 12:00 PM UTC, only on Friday and Saturday
schedule:
- cron: '0 12 * * 5,6'

jobs:
dispatch-ci:
name: Dispatch CI
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
steps:
- name: Dispatch CI
uses: silverstripe/gha-dispatch-ci@v1
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ These recipes allow for the following features:
recipe dependencies without mandating the inclusion of all requirements directly.
- An `update-recipe` command to upgrade to a newer version of a recipe.

## Installation

```sh
composer require silverstripe/recipe-plugin
```

## Example output

![example-output](docs/_images/require-usage.png)
Expand All @@ -27,15 +33,15 @@ These recipes allow for the following features:

Recipes can be introduced to any existing project (even if not created on a silverstripe base project)

```shell
$ composer init
$ composer require silverstripe/recipe-cms ^1.0@dev
````
```sh
composer init
composer require silverstripe/recipe-cms
```

Alternatively you can create a new project based on an existing recipe

```shell
$ composer create-project silverstripe/recipe-cms ./myssproject ^1.0@dev
```sh
composer create-project silverstripe/recipe-cms ./myssproject
```

## Inlining recipes
Expand All @@ -50,18 +56,18 @@ install a new recipe.
Note that if you wish to run this command you must first install either a recipe via normal composer
commands, or install the recipe plugin:

```shell
$ composer init
$ composer require silverstripe/recipe-plugin ^0.1
$ composer require-recipe silverstripe/recipe-cms ^1.0@dev
```sh
composer init
composer require silverstripe/recipe-plugin
composer require-recipe silverstripe/recipe-cms
```

or

```shell
$ composer init
$ composer require silverstripe/recipe-cms ^1.0@dev
$ composer update-recipe silverstripe/recipe-cms
```sh
composer init
composer require silverstripe/recipe-cms
composer update-recipe silverstripe/recipe-cms
```

## Removing recipe dependencies or files
Expand All @@ -80,9 +86,9 @@ as below.
"mysite/code/PageController.php"
],
"project-dependencies-installed": {
"silverstripe/admin": "1.0.x-dev",
"silverstripe/asset-admin": "1.0.x-dev",
"silverstripe/campaign-admin": "1.0.x-dev"
"silverstripe/admin": "2.0.x-dev",
"silverstripe/asset-admin": "2.0.x-dev",
"silverstripe/campaign-admin": "2.0.x-dev"
}
}
}
Expand Down Expand Up @@ -148,10 +154,10 @@ An example recipe:
"description": "Example silverstripe recipe",
"type": "silverstripe-recipe",
"require": {
"silverstripe/recipe-plugin": "^0.1",
"silverstripe/recipe-cms": "^1.0",
"silverstripe/blog": "^3.0@dev",
"silverstripe/lumberjack": "^2.1@dev",
"silverstripe/recipe-plugin": "^1.0",
"silverstripe/recipe-cms": "^5.0",
"silverstripe/blog": "^4.0",
"silverstripe/lumberjack": "^3.0",
},
"extra": {
"project-files": [
Expand Down

0 comments on commit a66ac92

Please sign in to comment.