Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add make-official-release script #1524

Merged
merged 3 commits into from
Oct 1, 2024
Merged

Add make-official-release script #1524

merged 3 commits into from
Oct 1, 2024

Conversation

peaBerberian
Copy link
Collaborator

@peaBerberian peaBerberian commented Sep 2, 2024

This PR tries to facilitate and improve the action of making releases (both development releases and official releases) in the RxPlayer:

  • For official releases: a new scripts/make-official-release.sh script was added.

    Before, the steps to make one were mainly manual and detailed in doc/contributing/releases.md.

    Doing those steps manually was error-prone and stressful (e.g. of making by mistake a tag+release on GitHub's interface before pushing the related dev, or forgetting to update the CHANGELOG.md etc.)

    The script performs the same steps, with most of it automatized. For those that cannot be automatized easily (e.g. looking at our CI's result on GitHub, checking that the API documentation and demo works as expected etc.), the script will pause, tell you what you need to do manually and propose an input to continue once it's done.

    I also added some text on each of those "pause" to indicate what to do if you wanted to abort at that point. You will then be able to re-launch the script later when you're ready.

  • Add verification in all those scripts whether the version's name is already taken either as a git's branch or as an npm release (may also do as a git tag in the future) and abort in the beginning if it's the case.

  • Automatically pre-construct the CHANGELOG,md file each time a new release (dev like official) is done.

    This would be done by checking merge requests since the last CHANGELOG.md change when the user calls a script to make a new release. User intervention on this changelog will be asked after this (e.g. to "categorize" those change proposal into features, bug fixes and so on).

@peaBerberian peaBerberian added the script Relative to the RxPlayer's scripts (e.g. build scripts, release scripts etc.) label Sep 2, 2024
@peaBerberian peaBerberian force-pushed the misc/new-release-script branch 15 times, most recently from 5e0e3cf to 598d4d4 Compare September 3, 2024 14:00
@peaBerberian peaBerberian added the Priority: 2 (Medium) This issue or PR has a medium priority. label Sep 3, 2024
@peaBerberian peaBerberian force-pushed the misc/new-release-script branch 8 times, most recently from 640ee5a to fd4c9d0 Compare September 3, 2024 18:24
@peaBerberian peaBerberian changed the title [WIP] Add make-official-release script Add make-official-release script Sep 3, 2024
peaBerberian added a commit that referenced this pull request Sep 4, 2024
I noticed that the `scripts` directory, which begins to have a lot of
files as we automate more tasks (like #1524), wasn't linted.

That directory contains code in two languages BASH and JS (Node.js),
with a move to prefer JS files (as it's a JS/TS project).

So I chose to add an `.eslintrc.js` file (which is a deprecated format
but I couldn't make the new one work) and lint script on that directory.

I subsequently fixed some linting errors.

For now, that script isn't run by our GitHub actions, I will see whether
we can do an intelligent kind of runner which detects if scripts have
been updated.
peaBerberian added a commit that referenced this pull request Sep 4, 2024
I noticed that the `scripts` directory, which begins to have a lot of
files as we automate more tasks (like #1524), wasn't linted.

That directory contains code in two languages BASH and JS (Node.js),
with a move to prefer JS files (as it's a JS/TS project).

So I chose to add an `.eslintrc.js` file (which is a deprecated format
but I couldn't make the new one work) and lint script on that
directory.

I subsequently fixed some linting errors.

For now, that script isn't run by our GitHub actions, I will see whether
we can do an intelligent kind of runner which detects if scripts have
been updated.
peaBerberian added a commit that referenced this pull request Sep 4, 2024
I noticed that the `scripts` directory, which begins to have a lot of
files as we automate more tasks (like #1524), wasn't linted.

That directory contains code in two languages BASH and JS (Node.js),
with a move to prefer JS files (as it's a JS/TS project).

So I chose to add an `.eslintrc.js` file (which is a deprecated format
but I couldn't make the new one work) and lint script on that
directory.

I subsequently fixed some linting errors.

For now, that script isn't run by our GitHub actions, I will see whether
we can do an intelligent kind of runner which detects if scripts have
been updated.
peaBerberian added a commit that referenced this pull request Sep 4, 2024
I noticed that the `scripts` directory, which begins to have a lot of
files as we automate more tasks (like #1524), wasn't linted.

That directory contains code in two languages BASH and JS (Node.js),
with a move to prefer JS files (as it's a JS/TS project).

So I chose to add an `.eslintrc.js` file (which is a deprecated format
but I couldn't make the new one work) and lint script on that
directory.

I subsequently fixed some linting errors.

For now, that script isn't run by our GitHub actions, I will see whether
we can do an intelligent kind of runner which detects if scripts have
been updated.
@peaBerberian peaBerberian force-pushed the misc/new-release-script branch from fd4c9d0 to b028e7f Compare September 4, 2024 09:48
@peaBerberian peaBerberian added this to the 4.2.0 milestone Sep 4, 2024
@peaBerberian peaBerberian force-pushed the misc/new-release-script branch 4 times, most recently from 410a673 to b394f40 Compare September 10, 2024 13:26
scripts/make-dev-releases Outdated Show resolved Hide resolved
scripts/make-dev-releases Outdated Show resolved Hide resolved
Comment on lines +69 to +76
check_dependency git
check_dependency echo
check_dependency npm
check_dependency cut
check_dependency grep
check_dependency sed
check_dependency sleep

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that it checks every requirements before attempting to create branch/publish because it could be annoying if the script fail midway

@peaBerberian peaBerberian merged commit 14d9de9 into dev Oct 1, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 2 (Medium) This issue or PR has a medium priority. script Relative to the RxPlayer's scripts (e.g. build scripts, release scripts etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants