hypertrons / hypertrons-crx

A browser extension for insights into GitHub, Gitee projects and developers.
https://hypercrx.cn
Apache License 2.0
357 stars 102 forks source link

[CI/CD] Update project version #333

Closed wxharry closed 2 years ago

wxharry commented 2 years ago

Type of Issue

Introduction to the issue

In my previous commit, we updated the version in package.json manually. This could be a problem when contributors are working together. Since hypercrx are going to embrace more contributors, it needs to be fixed as soon as possible.

Possible Fix

  1. Command npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease | from-git] can help updating a version.
menbotics[bot] commented 2 years ago

This issue has not been replied for 24 hours, please pay attention to this issue: @heming6666 @LiuChangFreeman @xiaoya-Esther @tyn1998 @zhuxiangning

tyn1998 commented 2 years ago

Totally agree! We need another strategy to handle version updating.

wxharry commented 2 years ago

I notice that for each update, hypercrx pre-releases but not releases. Why?

tyn1998 commented 2 years ago

Maybe pre means preview? Just refer to releases of Qv2ray.

image
tyn1998 commented 2 years ago

We should have "release" for those will be pushed to chrome/edge store.

wxharry commented 2 years ago

Here is what I understand on version updating, please feel free to correct me!

  1. The contributors are not responsible for modifying the version number.
  2. Version number is a tag given by someone responsible for the project.
  3. Any other changes relevant to the Version number is done by CI/CD.
  4. Release and publish is done by CI/CD.
  5. Since we are using numbers not latest to label the releases, there will be history of releases.
tyn1998 commented 2 years ago

Hey Harray! Sorry to tell you that I, in practice, do not have a clear picture about the version management things. But I can give you some facts and what flow hypercrx might need.

Facts:

Needs:

Notes: Since the version numbers are in .json .ts files, so we may figure a way out to allow CI/CD workflow to change these numbers easily. e.g. a higher level constant value which will be imported in files?

tyn1998 commented 2 years ago

We'd better learn from other well organized projects :)

wxharry commented 2 years ago

Thank you for your reply! It is really important to figure out what hypercrx needs before getting started and now I am having a basic picture. As for those numbers, maybe we can use js scripts to update and it can be triggered in CI/CD. I am also a beginner on this and is looking for other projects for a practical way to do this. Any examples and ideas are welcome!

tyn1998 commented 2 years ago

Keep discussing~

wxharry commented 2 years ago

We can add scripts to the project to handle the release and deployment work. Inspired by how prettier handle releases. And scripts on https://github.com/hypertrons/hypertrons-crx/issues/290 can also be added to it.

tyn1998 commented 2 years ago

Thanks for the info, I will look into it!