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

Update docs for maintaining starters #651

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,16 @@ The code in the examples repos do not strictly require a versioned release since

### Starters

1. **Create a tag** that is Lerna-compatible matching the format: `[project]@[version]`, e.g. `[email protected]`
1. **Update package.json** with the new release version for that starter, e.g. `2.0.0-alpha.0`. This is important so the developer knows which version of the starter they had when they first started their project.

2. **Create a tag** that is Lerna-compatible matching the format: `[project]@[version]`, e.g. `[email protected]`

```
git tag [email protected]
git push --tags
```

2. **Sync git repositories**
3. **Sync git repositories**

If the release is a prerelease, sync the monorepo with:

Expand All @@ -158,6 +160,24 @@ The code in the examples repos do not strictly require a versioned release since

All recent changes on `main` will be squashed into a commit on the target git repo using the latest commit message.

4. **Create a GitHub release and tag**

The git tag created in step 1 was for the monorepo; it doesn’t exist in the starters’ git repos. We’ll create a GitHub release to make it easier for developers to see the changes between different versions of the starter.

To create a GitHub release, go to the releases page for:

- [basic-starter](https://github.com/chapter-three/next-drupal-basic-starter/releases)
- [graphql-starter](https://github.com/chapter-three/next-drupal-graphql-starter/releases)

And then:

1. Click the “Draft a new release” button.
2. In the **“Target:” drop-down**, select the `main` branch if this is going to be a normal release or select the `canary` branch if this is going to be a prerelease.
3. In the **“Choose a tag” widget**, type the new git tag, e.g. `2.0.0-alpha.0`, and hit `enter`. The help text will say “Excellent! This tag will be created from the target when you publish this release.”
4. In the “Release title” text field, type the same tag as the previous step.
5. Check either the “Set as a pre-release” checkbox or the “Set as the latest release” checkbox.
6. Click the “Publish release” button.

### Docs

@TODO: Expand details the next time docs are deployed.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"phpcs": "./drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next",
"test:next": "SIMPLETEST_DB=sqlite://localhost/:memory: ./drupal/vendor/bin/phpunit -c ./drupal/web/core modules/next",
"sync:modules": "./scripts/sync-repo.sh 1.0.x [email protected]:project/ \"modules/*\"",
"sync:examples": "./scripts/sync-repo.sh main https://github.com/chapter-three/next- \"examples/example-*\"",
"sync:starters": "./scripts/sync-repo.sh canary https://github.com/chapter-three/next-drupal- \"starters/*\"",
"sync:starters:release": "./scripts/sync-repo.sh canary,main https://github.com/chapter-three/next-drupal- \"starters/*\"",
"sync:examples": "./scripts/sync-repo.sh main git@github.com:chapter-three/next- \"examples/example-*\"",
"sync:starters": "./scripts/sync-repo.sh canary git@github.com:chapter-three/next-drupal- \"starters/*\"",
"sync:starters:release": "./scripts/sync-repo.sh canary,main git@github.com:chapter-three/next-drupal- \"starters/*\"",
"seed": "NUM_NODES=200 node ./scripts/seed",
"cy:open": "turbo run cy:open --parallel",
"test": "yarn workspace next-drupal test && yarn workspace next-drupal-query test",
Expand Down
4 changes: 2 additions & 2 deletions starters/basic-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "basic-starter",
"version": "1.8.0",
"version": "2.0.0-alpha.0",
"private": true,
"license": "MIT",
"scripts": {
Expand All @@ -14,7 +14,7 @@
},
"dependencies": {
"next": "^14",
"next-drupal": "^1.6.0",
"next-drupal": "^2.0.0-alpha.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions starters/graphql-starter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphql-starter",
"version": "0.1.0",
"version": "2.0.0-alpha.0",
"private": true,
"license": "MIT",
"scripts": {
Expand All @@ -14,7 +14,7 @@
},
"dependencies": {
"next": "^14",
"next-drupal": "^1.6.0",
"next-drupal": "^2.0.0-alpha.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down