Skip to content

Commit

Permalink
docs: how to test scaffold updates on Studio (#916)
Browse files Browse the repository at this point in the history
* docs: how to test scaffold updates on Studio

* update pr template links

* fix links in checklists

* fix links in commands and authoring-modules
  • Loading branch information
danielsousaio authored Jul 27, 2023
1 parent 54727ce commit d0a4070
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ _Related PRs:_

Did you make changes to the scaffold?

- [ ] Yes, and I have read the [scaffold checklist](/docs/scaffold-checklist.md) document and followed the instructions.
- [ ] Yes, and I have read the [scaffold checklist](https://crowdbotics.github.io/modules/scaffold-checklist.html) document and followed the instructions.
- [ ] No.

Did you make changes to modules or created a new module?

- [ ] Yes, and have read the [modules checklist](/docs/modules-checklist.md) document and followed the instructions.
- [ ] Yes, and have read the [modules checklist](https://crowdbotics.github.io/modules/modules-checklist.html) document and followed the instructions.
- [ ] No.

## Changes introduced
Expand Down
4 changes: 2 additions & 2 deletions docs/authoring-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Your module's `main` key should always point to `index.js`. We also suggest that

Your module can include its own dependencies, more on that in the following sections.

[react-native/maps/package.json](/modules/react-native/maps/package.json)
[react-native/maps/package.json](https://github.com/crowdbotics/modules/blob/master/modules/react-native/maps/package.json)

```json
{
Expand Down Expand Up @@ -194,7 +194,7 @@ const global = getGlobalOptions();

### Writing your options file

This is an example of an [options file](/modules/react-native-app-menu/options.js) for our App Menu module:
This is an example of an [options file](https://github.com/crowdbotics/modules/blob/master/modules/react-native-app-menu/options.js) for our App Menu module:

```javascript
import { StyleSheet } from "react-native";
Expand Down
10 changes: 5 additions & 5 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
yarn run parse
```

Run the command to validate, parse and export the modules source code into a [JSON file](/dist/modules.json).
Run the command to validate, parse and export the modules source code into a JSON file.

Example output:

Expand Down Expand Up @@ -73,7 +73,7 @@ Supported module types:
yarn run demo
```

This command runs `npx react-native init` with [`--template`](https://github.com/react-native-community/cli/tree/master/packages/global-cli#--template) pointing to our own [Custom React Native template](/scaffold/template).
This command runs `npx react-native init` with [`--template`](https://github.com/react-native-community/cli/tree/master/packages/global-cli#--template) pointing to our own [Custom React Native template](https://github.com/crowdbotics/modules/blob/master/scaffold/template).

## Install a module

Expand All @@ -83,7 +83,7 @@ yarn run add [<module_name>]

Installs a list of modules into the demo app, performing the follow operations:

1. Copies the module directory from [modules](/modules) into `demo/modules`.
1. Copies the module directory from [modules](https://github.com/crowdbotics/modules/blob/master/modules) into `demo/modules`.
2. Runs `yarn add <module_name>` in the `demo` directory.
3. Runs `yarn add <dependency>` for every `x-dependencies` in the module `package.json`.

Expand Down Expand Up @@ -166,7 +166,7 @@ yarn run commit-module [<module_name>]
yarn run semver
```

Checks if the scaffold [.crowdbotics.json](/scaffold/template/custom/.crowdbotics.json) version is at an expected value.
Checks if the scaffold [.crowdbotics.json](https://github.com/crowdbotics/modules/blob/master/scaffold/template/custom/.crowdbotics.json) version is at an expected value.

## Generate a scaffold upgrade manifest

Expand All @@ -175,6 +175,6 @@ pipenv shell
yarn run manifest
```

Produces a manifest file in [manifest](/manifest) based on the last version configured in [config.js](/config.js).
Produces a manifest file in [manifest](https://github.com/crowdbotics/modules/blob/master/manifest) based on the last version configured in [config.js](https://github.com/crowdbotics/modules/blob/master/config.js).

For `nextVersionSHA` use your branch name, and then after your PR gets merged you will have the SHA for the squashed commit. Open a followup PR that changes the next version to that SHA instead. See [#892](https://github.com/crowdbotics/modules/pull/892) as an example.
2 changes: 1 addition & 1 deletion docs/modules-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ When making changes to a module please make sure that:
- you ran `yarn run dist` and added the changes.
- you can open your module in the demo app (`yarn run demo`, `yarn run add <your-module-name-here>`, `cd demo; npx react-native-start`).

Include as much documentation for your module as possible, and if you haven't seen it yet we created a style guide for [Authoring Modules](/docs/authoring-modules.md).
Include as much documentation for your module as possible, and if you haven't seen it yet we created a style guide for [Authoring Modules](/modules/authoring-modules.html).
14 changes: 9 additions & 5 deletions docs/scaffold-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ When making scaffold updates, please make sure the following still works:
- Web deployment (called API in the Dashboard)
- Web local dev server (`yarn run web`)
- Web local build (`yarn run web:build`)
- Studio loads the app and the welcome screen is rendered correctly
- Studio loads the app and the welcome screen renders correctly

Then double check your work with those helper scripts checks:
In order to test scaffold updates on Dashboard/Studio create a new Review App and set `REACT_NATIVE_SCAFFOLD_REPO_BRANCH` to the name of your branch.

Double check your work locally with those helper scripts checks:

- `yarn run bootstrap` produces no changes besides potential changes in `yarn.lock` resolved versions
- `yarn run template` produces no changes
- `yarn run semver` check passes

**Important!**

Increase the version of the scaffold in [package.json](/scaffold/package.json) and [.crowdbotics.json](/scaffold/template/custom/.crowdbotics.json).
Make this new version available in the upgrade tool (npx crowdbotics/modules) by updating [config.js](/config.js) to include a new `config.upgrade.versions` and then finally run:
Increase the version of the scaffold in [package.json](https://github.com/crowdbotics/modules/blob/master/scaffold/package.json) and [.crowdbotics.json](https://github.com/crowdbotics/modules/blob/master/scaffold/template/custom/.crowdbotics.json).

Make this new version available in the upgrade tool (npx crowdbotics/modules) by updating [config.js](https://github.com/crowdbotics/modules/blob/master/config.js) to include a new `config.upgrade.versions` and then finally run:

```
pipenv shell
yarn run manifest
```

Finally make sure to update the scaffold [CHANGELOG](/scaffold/CHANGELOG.md) with human friendly descriptions.
Finally make sure to update the scaffold [CHANGELOG](https://github.com/crowdbotics/modules/blob/master/scaffold/CHANGELOG.md) with human friendly descriptions.

0 comments on commit d0a4070

Please sign in to comment.