Updating the server
We update the server using the following procedure.
GitHub Issues
First, create an Issue on GitHub. We also have an issue template prepared for releases.
Updating version
You can manage and change versions in package.json and package-lock.json easily using the npm version command.
Here’s how you can use it:
npm version <new-version>
In this command, replace <newversion> with the new version number (e.g., 1.0.2). Running this command updates the version numbers in both package.json and package-lock.json to the version number you specify.
Alternatively, you can use one of the following keywords in place of
- patch: this increments the patch version (e.g., 1.0.1 -> 1.0.2)
- minor: this increments the minor version (e.g., 1.0.1 -> 1.1.0)
- major: this increments the major version (e.g., 1.0.1 -> 2.0.0)
Please note that running the npm version command will create a new commit including the version update and also tag it with the new version number (this behavior can be altered in the settings).
Pushing and Merging
- Create a PR (Pull Request). In this case, since the issue is not closed, it is not necessary to rewrite the template.
- Merge the PR (Pull Request) without any checks.
- Push the created tag to origin.
GitHub
- Attach the
enhancement
label to closed PRs that appear to be feature enhancements. - Open the release creation page on GitHub and click the
Draft a new release
button. - Select the newly created tag with
Choose a tag
. - Press the
Generate release notes
button. - Delete the Release section of the automatically generated release notes.
- Preview to check for any problems.
- If there are no problems, press the
Publish release
button to create the release.
Connecting Server
Connect to the server using the ssh dev@sinpro-dev
command.
Updating
Execute the following command.
cd ~/dev/sinpro-dev
git checkout main && git pull
npm i --legacy-peer-deps
npm run build
pm2 restart sinpro-dev
Checking
- Connect to https://sinpro.dev/
- Confirm that the version has been updated.
- Confirm that there are no issues with the display.
- Confirm that there are no issues with the operation.
Announcement
- If there are additions or updates to the documentation, announce them to the members.
- Request the product manager to make an announcement on social media.