From 110687504df5eebeb8053ea4628daa8cd199d92d Mon Sep 17 00:00:00 2001 From: Paul Berberian Date: Tue, 20 Feb 2024 19:49:55 +0100 Subject: [PATCH] Update script and doc to reference the legacy-v3 branch --- .github/workflows/checks.yml | 2 +- .github/workflows/sonarcloud_analysis.yml | 2 +- CONTRIBUTING.md | 9 +---- doc/contributing/releases.md | 42 +++++++++++------------ scripts/update_gh-pages_demo | 16 +++------ scripts/update_gh-pages_doc | 11 +++--- 6 files changed, 33 insertions(+), 49 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 128fe7b44e..a950f20f98 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,7 +5,7 @@ name: RxPlayer Tests on: push: - branches: [ master, next ] + branches: [legacy-v3] pull_request: types: [opened, synchronize, reopened] diff --git a/.github/workflows/sonarcloud_analysis.yml b/.github/workflows/sonarcloud_analysis.yml index 0ee55d514b..4b2c8c95bd 100644 --- a/.github/workflows/sonarcloud_analysis.yml +++ b/.github/workflows/sonarcloud_analysis.yml @@ -2,7 +2,7 @@ name: SonarCloud analysis on: push: branches: - - master, next + - legacy-v3 pull_request: types: [opened, synchronize, reopened] jobs: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a579fe9b49..df23512583 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -262,11 +262,4 @@ calling the `doc` script through `npm run doc`. ### Which branch to merge to -Pull requests for bug fixes, new tests or documentation should be done on the -`master` branch. - -Pull requests for new features and breaking changes will have to be performed -on the `next` branch. - -If you don't know on which branch to do a pull request, please open it on -`master`, we will know how to redirect it to the right one. +Pull requests should be done on the `legacy-v3` branch. diff --git a/doc/contributing/releases.md b/doc/contributing/releases.md index 32858d946d..be13e6b199 100644 --- a/doc/contributing/releases.md +++ b/doc/contributing/releases.md @@ -119,54 +119,52 @@ The RxPlayer has several types of releases: Before each official releases, a list of steps are performed by its maintainers: 1. Checkout the branch that will be the base of the next release: generally it - is either `master` (for patch releases) or `next` (for minor versions). + is `legacy-v3` (for v3 releases) -2. Rebase that branch on the `master` branch if it is a different branch - (e.g.: `git rebase master --rebase-merges`). - -3. From there, create a branch named `release/vXX.XX.XX`, where XX.XX.XX is the +2. From there, create a branch named `release/vXX.XX.XX`, where XX.XX.XX is the semver of the wanted new version. -4. Update `CHANGELOG.md` file to add this new version's changelog and commit it. +3. Update `CHANGELOG.md` file to add this new version's changelog and commit it. -5. Call the npm script `update-version` for that release (`npm run update-version XX.XX.XX`, +4. Call the npm script `update-version` for that release (`npm run update-version XX.XX.XX`, where XX.XX.XX is the wanted new version SEMVER). -6. Check that the modifications it did make sense and create a signed commit +5. Check that the modifications it did make sense and create a signed commit (`-S` option when commiting with git) updating the staged built files in step `8`. -7. Open a Pull Request on Github, named after the branch, putting the release's +6. Open a Pull Request on Github, named after the branch, putting the release's changelog in the Pull Request's comment, and optional additional comments. -8. Check that sonarcloud validated that branch. Resolve every bug and code +7. Check that sonarcloud validated that branch. Resolve every bug and code smells it finds. -9. Ensure that the CI doesn't detect any issue and fix them if that's the case. +8. Ensure that the CI doesn't detect any issue and fix them if that's the case. -10. Run sanity checks on myCanal's repository, by using this new version instead - as a dependency. +9. Run sanity checks on myCanal's repository, by using this new version instead + as a dependency. -11. If and only if no problem was seen perform a signed merge without +10. If and only if no problem was seen perform a signed merge without fast-forward of the release branch into master (`git merge -S --no-ff release/vXX.XX.XX master`) -12. Launch script to update the gh-pages demo (`./scripts/update_gh-pages_demo`) +11. Launch script to update the gh-pages demo (`./scripts/update_gh-pages_demo`) -13. Launch script to update the gh-pages doc (`./scripts/update_gh-pages_doc`) +12. Launch script to update the gh-pages doc (`./scripts/update_gh-pages_doc`) -14. Check that both of those worked, perform manual updates and update the +13. Check that both of those worked, perform manual updates and update the concerned scripts in other cases. -15. Check that the new demo and the new doc work as expected +14. Check that the new demo and the new doc work as expected -16. If all seems good, push to origin/master your local master branch. +15. If all seems good, push to origin/master your local master branch. -17. run `npm publish` to publish the new version on npm's registry. +16. run `npm publish --tag legacy-v3` to publish the new version on npm's + registry with the `legacy-v3` tag. -18. Test that importing this new version doesn't cause bundling issues (you +17. Test that importing this new version doesn't cause bundling issues (you may do so through a ad-hoc package, or just myCanal for example). -19. Create the new release through github's interface - don't forget to include +18. Create the new release through github's interface - don't forget to include the built files on it. If any of the testing steps failed (after step `3`), run the following steps: diff --git a/scripts/update_gh-pages_demo b/scripts/update_gh-pages_demo index 18b6eaceb6..2ad306a23f 100755 --- a/scripts/update_gh-pages_demo +++ b/scripts/update_gh-pages_demo @@ -8,7 +8,7 @@ # # To use it: # -# 1. Be sure that you're on a clean (no staged files and no diff) master +# 1. Be sure that you're on a clean (no staged files and no diff) legacy-v3 # branch. # # 2. Call this script. @@ -22,9 +22,9 @@ set -e current_branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') current_version=$(cat VERSION) -if ! [ "$current_branch" == "master" ]; then +if ! [ "$current_branch" == "legacy-v3" ]; then echo $current_branch - echo "ERROR: The current branch should be master" + echo "ERROR: The current branch should be legacy-v3" exit 1; fi @@ -32,7 +32,7 @@ fi npm run demo:min if [ -n "$(git status --porcelain doc)" ]; then - echo "ERROR: Please commit your modifications to master" + echo "ERROR: Please commit your modifications to legacy-v3" exit 1; fi @@ -72,12 +72,6 @@ mv $tmpFontsDir/fonts "versions/$current_version/demo/fonts" mv $tmpAssetsDir/assets "versions/$current_version/demo/assets" mv $tmpStylesDir/styles "versions/$current_version/demo/styles" mv $tmpDemoList generate_demo_list.js -ln -s "./versions/$current_version/demo/index.html" index.html -ln -s "./versions/$current_version/demo/plus.ico" plus.ico -ln -s "./versions/$current_version/demo/bundle.js" bundle.js -ln -s "./versions/$current_version/demo/fonts" fonts -ln -s "./versions/$current_version/demo/assets" assets -ln -s "./versions/$current_version/demo/styles" styles node generate_demo_list.js rm generate_demo_list.js @@ -129,4 +123,4 @@ else echo "nothing to do on the gh-pages branch" fi -git checkout master +git checkout legacy-v3 diff --git a/scripts/update_gh-pages_doc b/scripts/update_gh-pages_doc index 50c4e51fc2..f3f9ab8248 100755 --- a/scripts/update_gh-pages_doc +++ b/scripts/update_gh-pages_doc @@ -8,7 +8,7 @@ # # To use it: # -# 1. Be sure that you're on a clean (no staged files and no diff) master +# 1. Be sure that you're on a clean (no staged files and no diff) legacy-v3 # branch. # # 2. Call this script. @@ -22,9 +22,9 @@ set -e current_branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') current_version=$(cat VERSION) -if ! [ "$current_branch" == "master" ]; then +if ! [ "$current_branch" == "legacy-v3" ]; then echo $current_branch - echo "ERROR: The current branch should be master" + echo "ERROR: The current branch should be legacy-v3" exit 1; fi @@ -32,7 +32,7 @@ fi npm run doc if [ -n "$(git status --porcelain doc)" ]; then - echo "ERROR: Please commit your modifications to master" + echo "ERROR: Please commit your modifications to legacy-v3" exit 1; fi @@ -50,7 +50,6 @@ rm -rf "versions/$current_version/doc" mkdir -p "versions/$current_version/doc" rm -rf doc mv $tmpDir/* "versions/$current_version/doc" -ln -s "./versions/$current_version/doc" doc mv $tmpDocList generate_documentation_list.js node generate_documentation_list.js @@ -103,4 +102,4 @@ else echo "nothing to do on the gh-pages branch" fi -git checkout master +git checkout legacy-v3