You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+75-35Lines changed: 75 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,15 @@
2
2
3
3
Want to help improve SST? Thank you! Take a second to review this document before you get started.
4
4
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:
11
6
12
7
-[Open a new issue][issue] about it
13
8
- Or [join us on Slack][slack] and send us a message
14
9
15
10
## Running Locally
16
11
12
+
### Clone the repo
13
+
17
14
To run this project locally, clone the repo and initialize the project.
18
15
19
16
```bash
@@ -37,14 +34,33 @@ And if you make changes to the stub Lambdas, you'll need to package them.
37
34
$ yarn build
38
35
```
39
36
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
+
```
41
42
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.
43
44
44
45
```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
45
55
$ yarn test
46
56
```
47
57
58
+
Alternatively, you can run a specific test.
59
+
60
+
```bash
61
+
$ yarn test<path_to_the_test_dir>
62
+
```
63
+
48
64
### Docs
49
65
50
66
To run the docs site.
@@ -54,9 +70,25 @@ $ cd www
54
70
$ yarn start
55
71
```
56
72
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
+
57
89
## Releases
58
90
59
-
To cut a release, follow these steps.
91
+
To cut a release, start by merging the PRs that are going into this release.
60
92
61
93
1. Generate changelog
62
94
@@ -66,11 +98,33 @@ To cut a release, follow these steps.
66
98
67
99
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.
68
100
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
+
```
70
108
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).
72
123
73
124
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)).
74
128
75
129
Add this snippet at the bottom of the changelog and replace it with the version that's going to be released.
76
130
@@ -84,37 +138,23 @@ To cut a release, follow these steps.
84
138
```
85
139
````
86
140
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
104
142
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.
106
144
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**.
108
146
109
-
Confirm and publish!
147
+
### Canary Releases
110
148
111
-
5. Publish GitHub release
149
+
Optionally, you can publish a canary release to npm.
112
150
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.
114
152
115
-
Copy-paste that version as the **Release title**. And hit **Publish release**.
0 commit comments