Skip to content

Navigation Menu

Sign in
Sign up

Commit 3a7b3e3

Browse files
authored
Update CONTRIBUTING.md
1 parent 754bd92 commit 3a7b3e3

1 file changed

Lines changed: 75 additions & 35 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 75 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
Want to help improve SST? Thank you! Take a second to review this document before you get started.
44

5-
There are two key areas that we could use your help with.
6-
7-
- Covering specific cases and setups
8-
- Improving the documentation
9-
10-
To make sure that you are not working on something that's already being worked on, make sure to either:
5+
To be sure that you are not working on something that's already being worked on, make sure to either:
116

127
- [Open a new issue][issue] about it
138
- Or [join us on Slack][slack] and send us a message
149

1510
## Running Locally
1611

12+
### Clone the repo
13+
1714
To run this project locally, clone the repo and initialize the project.
1815

1916
```bash
@@ -37,14 +34,33 @@ And if you make changes to the stub Lambdas, you'll need to package them.
3734
$ yarn build
3835
```
3936

40-
### Running tests
37+
Finally, after making your changes, run all the tests in the `packages/resources` directory.
38+
39+
```bash
40+
$ yarn test
41+
```
4142

42-
Finally, after making your changes, run all the tests at the repo root.
43+
Alternatively, you can run the tests for a specific construct.
4344

4445
```bash
46+
$ yarn test <path_to_the_test_for_the_construct>
47+
```
48+
49+
### CLI
50+
51+
If you are working on the `packages/cli` just go ahead and make your changes. Then run your tests.
52+
53+
```bash
54+
$ cd packages/cli
4555
$ yarn test
4656
```
4757

58+
Alternatively, you can run a specific test.
59+
60+
```bash
61+
$ yarn test <path_to_the_test_dir>
62+
```
63+
4864
### Docs
4965

5066
To run the docs site.
@@ -54,9 +70,25 @@ $ cd www
5470
$ yarn start
5571
```
5672

73+
## Pull Requests
74+
75+
Make sure to add your changes as a pull request. Start by forking the repo. Then make your changes and submit a PR.
76+
77+
- Use a descriptive name for the PR
78+
- With the format, "[Construct/package name]: [Description]"
79+
- For example, "Api: Add support for HTTP proxy routes"
80+
- Pick a label for the PR from:
81+
- `breaking`: These are for breaking changes
82+
- `bug`: Bug fixes
83+
- `enhancement`: New features
84+
- `documentation`: Improvements to the docs or examples
85+
- `skip changelog`: Don't mention this in the release notes
86+
87+
If you are sumbitting the PR for the first time, we'll need to approve it to run the tests.
88+
5789
## Releases
5890

59-
To cut a release, follow these steps.
91+
To cut a release, start by merging the PRs that are going into this release.
6092

6193
1. Generate changelog
6294

@@ -66,11 +98,33 @@ To cut a release, follow these steps.
6698

6799
You'll need to configure the `GITHUB_AUTH` token locally to be able to run this. [Follow these steps](https://github.com/lerna/lerna-changelog#github-token) and configure the local environment variable.
68100

69-
2. Draft a new release
101+
2. Publish a release to npm
102+
103+
To publish the release to npm run:
104+
105+
```bash
106+
$ yarn release
107+
```
70108

71-
Then copy the changelog that's generated and [draft a new release](https://github.com/serverless-stack/serverless-stack/releases/new).
109+
Pick the version you want (patch/minor/major). This is based on the type of changes in the changelog above.
110+
111+
- `breaking` and major `enhancement` changes are a minor version update
112+
- `bug` and minor `enhancement` changes are a patch version update
113+
114+
We are not currently updating the major version until our 1.0 release.
115+
116+
Verify that only the 5 core packages (`core`, `cli`, `resources`, `create-serverless-stack`, `static-site-env`) are getting published.
117+
118+
Confirm and publish!
119+
120+
3. Draft a new release
121+
122+
Copy the changelog that was generated above and [draft a new release](https://github.com/serverless-stack/serverless-stack/releases/new).
72123

73124
Make necessary edits to the changelog to make it more readable and helpful.
125+
126+
- For `breaking` changes, add a message at the top clearly documenting the change ([example](https://github.com/serverless-stack/serverless-stack/releases/tag/v0.26.0)).
127+
- For major `enhancement` changes, add a code snippet on how to use the feature ([example](https://github.com/serverless-stack/serverless-stack/releases/tag/v0.36.0)).
74128

75129
Add this snippet at the bottom of the changelog and replace it with the version that's going to be released.
76130

@@ -84,37 +138,23 @@ To cut a release, follow these steps.
84138
```
85139
````
86140

87-
Leave the draft as-is for now.
88-
89-
3. (Optional) Publish a canary release to npm
90-
91-
If you'd like to test your release before pushing it live, create a canary release by running.
92-
93-
```bash
94-
$ yarn release-canary
95-
```
96-
97-
4. Publish a release to npm
98-
99-
To publish the release to npm run:
100-
101-
```bash
102-
$ yarn release
103-
```
141+
5. Publish GitHub release
104142

105-
Pick the version you want (patch/minor/major) based on the type of changes in the changelog above.
143+
In the **Tag version** of the release draft, select the version that was just published to npm.
106144

107-
Verify that only the 4 core packages (`core`, `cli`, `resources`, `create-serverless-stack`) are getting published.
145+
Copy-paste that version as the **Release title**. And hit **Publish release**.
108146

109-
Confirm and publish!
147+
### Canary Releases
110148

111-
5. Publish GitHub release
149+
Optionally, you can publish a canary release to npm.
112150

113-
Head back to the release draft from before. In the **Tag version** select the version that was just published to npm.
151+
This is useful if you'd like to test your release before pushing it live.
114152

115-
Copy-paste that version as the **Release title**. And hit **Publish release**.
153+
Create a canary release by running.
116154

117-
Optionally, tweet this out!
155+
```bash
156+
$ yarn release-canary
157+
```
118158

119159
---
120160

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /