Skip to content

Commit d3f1039

Browse files
miquelbeltranCopilotsumitramanga
authored
docs: add Releasing and Contributing (#139)
* docs: add Releasing and Contributing * Update RELEASING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Sumitra Manga <36393794+sumitramanga@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Sumitra Manga <36393794+sumitramanga@users.noreply.github.com>
1 parent 733ce04 commit d3f1039

File tree

2 files changed

+157
-0
lines changed

2 files changed

+157
-0
lines changed

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to Raygun4ReactNative
2+
3+
## Project and library organisation
4+
5+
Building the project requires [Node.js](https://nodejs.org).
6+
7+
The project should work on all LTS Node versions.
8+
9+
All required React Native packages will be installed through `npm`.
10+
11+
- The `raygun4reactnative` package is in the `sdk` folder.
12+
- The `demo` folder contains an example app based on React Native.
13+
- The `ExpoDemo` folder contains an example app based on Expo.
14+
15+
## Building and running
16+
17+
The recommended IDE for working on this project is Visual Studio Code.
18+
19+
Setup instructions can be found in the `sdk` folder in the `README.md` file.
20+
21+
### Tests
22+
23+
To run tests, in the `sdk` folder run `npm run test` or run all tests from VSCode.
24+
25+
### Code analysis
26+
27+
To check the code, in the `sdk` folder run `npm run eslint`.
28+
29+
### Formatting
30+
31+
To format the code, in the `sdk` folder run `npm run prettier`.
32+
33+
### Running examples
34+
35+
Instructions on how to run the examples can be found in their respective folders.
36+
37+
## How to contribute?
38+
39+
This section is intended for external contributors not part of the Raygun team.
40+
41+
Before you undertake any work, please create a ticket with your proposal,
42+
so that it can be coordinated with what we're doing.
43+
44+
If you're interested in contributing on a regular basis,
45+
please get in touch with the Raygun team.
46+
47+
### Fork the repository
48+
49+
Please fork the main repository from https://github.com/MindscapeHQ/raygun4reactnative
50+
into your own GitHub account.
51+
52+
### Create a new branch
53+
54+
Create a local branch off `master` in your fork,
55+
named so that it explains the work in the branch.
56+
57+
Do not submit a PR directly from your `master` branch.
58+
59+
### Open a pull request
60+
61+
Submit a pull request against the main repositories' `master` branch.
62+
63+
Fill the PR template and give it a title that follows the [Conventional Commits guidelines](https://www.conventionalcommits.org/en/v1.0.0/).
64+
65+
### Wait for a review
66+
67+
Wait for a review by the Raygun team.
68+
The team will leave you feedback and might ask you to do changes in your code.
69+
70+
Once the PR is approved, the team will merge it.
71+

RELEASING.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Releasing Raygun4ReactNative
2+
3+
Raygun4ReactNative is published on npmjs.com as [`raygun4reactnative`](https://www.npmjs.com/package/raygun4reactnative).
4+
## Semantic versioning
5+
6+
This package follows semantic versioning.
7+
8+
Given a version number MAJOR.MINOR.PATCH (x.y.z), increment the:
9+
10+
- MAJOR version when you make incompatible changes
11+
- MINOR version when you add functionality in a backward compatible manner
12+
- PATCH version when you make backward compatible bug fixes
13+
14+
To learn more about semantic versioning check: https://semver.org/
15+
16+
## Preparing for release
17+
18+
### Release branch
19+
20+
Create a new branch named `release/x.y.z`
21+
where `x.y.z` is the Major, Minor and Patch release numbers.
22+
23+
### Update version
24+
25+
Update the `version` in the `src/package.json` file.
26+
27+
### Run npm install
28+
29+
Run `npm install` in the `sdk` to update the version in the `package-lock.json`.
30+
31+
### Update CHANGELOG.md
32+
33+
Add a new entry in the `CHANGELOG.md` file.
34+
35+
Obtain a list of changes using the following git command:
36+
37+
```
38+
git log --pretty=format:"- %s (%as)"
39+
```
40+
41+
### Run publish dry-run
42+
43+
Run a publish dry-run in the `sdk` to ensure no errors appear:
44+
45+
```
46+
npm publish --dry-run
47+
```
48+
49+
### Commit and open a PR
50+
51+
Commit all the changes into a commit with the message `chore: Release x.y.z`
52+
where `x.y.z` is the Major, Minor and Patch release numbers.
53+
54+
Then push the branch and open a new PR, ask the team to review it.
55+
56+
## Publishing
57+
58+
### PR approval
59+
60+
Once the PR has been approved, you can publish the provider.
61+
62+
### Publish to npmjs.com
63+
64+
Run the publish command without `dry-run`.
65+
You will need an account in npmjs.com to publish,
66+
as well as being part of the [Raygun organization](https://www.npmjs.com/~raygunowner).
67+
68+
```
69+
npm publish
70+
```
71+
72+
Now the package is available for customers.
73+
74+
### Merge PR to master
75+
76+
With the PR approved and the package published,
77+
squash and merge the PR into `master`.
78+
79+
### Tag and create Github Release
80+
81+
Go to https://github.com/MindscapeHQ/raygun4reactnative/releases and create a new Release.
82+
83+
GitHub will create a tag for you, you don't need to create the tag manually.
84+
85+
You can also generate the release notes automatically.
86+

0 commit comments

Comments
 (0)