|
1 | | -# SyncMaster UI |
| 1 | +# Contributing Guide |
2 | 2 |
|
3 | | -## Getting started |
| 3 | +Welcome! There are many ways to contribute, including submitting bug |
| 4 | +reports, improving documentation, submitting feature requests, reviewing |
| 5 | +new submissions, or contributing code that can be incorporated into the |
| 6 | +project. |
4 | 7 |
|
5 | | -### Development |
| 8 | +## Review process |
6 | 9 |
|
7 | | -First, install the dependencies of the project: |
| 10 | +For any **significant** changes please create a new GitHub issue and |
| 11 | +enhancements that you wish to make. Describe the feature you would like |
| 12 | +to see, why you need it, and how it will work. Discuss your ideas |
| 13 | +transparently and get community feedback before proceeding. |
| 14 | + |
| 15 | +Small changes can directly be crafted and submitted to the GitHub |
| 16 | +Repository as a Pull Request. This requires creating a **repo fork** using |
| 17 | +[instruction](https://docs.github.com/en/get-started/quickstart/fork-a-repo). |
| 18 | + |
| 19 | +## Initial setup for local development |
| 20 | + |
| 21 | +### Install Git |
| 22 | + |
| 23 | +Please follow |
| 24 | +[instruction](https://docs.github.com/en/get-started/quickstart/set-up-git). |
| 25 | + |
| 26 | +### Clone the repo |
| 27 | + |
| 28 | +Open terminal and run these commands: |
| 29 | + |
| 30 | +```bash |
| 31 | +git clone [email protected]:myuser/syncmaster-ui.git |
| 32 | + |
| 33 | +cd syncmaster-ui |
| 34 | +``` |
| 35 | + |
| 36 | +### Setup environment |
| 37 | + |
| 38 | +To install all necessary dependencies, run these commands: |
| 39 | + |
| 40 | +```bash |
| 41 | +yarn install --immutable |
| 42 | +yarn run pre-commit-install |
| 43 | +``` |
| 44 | + |
| 45 | +# How to |
| 46 | + |
| 47 | +## Run development server |
8 | 48 |
|
9 | 49 | ```bash |
10 | | -yarn |
| 50 | +yarn run dev |
11 | 51 | ``` |
12 | 52 |
|
13 | | -Run the application in development mode: |
| 53 | +### Create pull request |
| 54 | + |
| 55 | +Commit your changes: |
| 56 | + |
14 | 57 | ```bash |
15 | | -yarn start |
| 58 | +git commit -m "Commit message" |
| 59 | +git push |
16 | 60 | ``` |
17 | | -Open [https://localhost:3000](https://localhost:3000) with your browser to see the result. |
18 | 61 |
|
19 | | -### Linters |
| 62 | +Then open Github interface and [create pull request](https://docs.github.com/en/get-started/quickstart/contributing-to-projects#making-a-pull-request). |
| 63 | +Please follow guide from PR body template. |
| 64 | + |
| 65 | +After pull request is created, it get a corresponding number, e.g. 123 |
| 66 | +(`pr_number`). |
| 67 | + |
| 68 | +## Release Process |
| 69 | + |
| 70 | +Note: this is only for repo maintainers |
| 71 | + |
| 72 | +0. Checkout to ``develop`` branch and update it to the actual state |
| 73 | + |
| 74 | +```bash |
| 75 | +git checkout develop |
| 76 | +git pull -p |
| 77 | +``` |
| 78 | + |
| 79 | +1. Merge ``develop`` branch to ``master``, **WITHOUT** squashing |
| 80 | + |
| 81 | +```bash |
| 82 | +git checkout master |
| 83 | +git pull |
| 84 | +git merge develop |
| 85 | +git push |
| 86 | +``` |
| 87 | + |
| 88 | +2. Add git tag to the latest commit in ``master`` branch |
| 89 | + |
| 90 | +```bash |
| 91 | +git tag "$VERSION" |
| 92 | +git push origin "$VERSION" |
| 93 | +``` |
20 | 94 |
|
21 | | -When you commit your changes, the pre-commit operation will be launched using husky and lint-staged packages. This setting is installed automatically along with the installation of dependencies. |
| 95 | +VERSION should be the same as for backend. |
22 | 96 |
|
23 | | -### Build |
| 97 | +3. Update version in ``develop`` branch **after release**: |
24 | 98 |
|
25 | | -If you want to build the project, use next command: |
26 | 99 | ```bash |
27 | | -yarn build |
| 100 | +sed -i "s#\"version\": \"[[:digit:]]\.[[:digit:]]\.[[:digit:]]\"#\"version\": \"$VERSION\"#" package.json package-lock.json |
| 101 | +npm i |
28 | 102 | ``` |
29 | | -Then use `yarn start:prod` for running the project in production mode. |
|
0 commit comments