Skip to content

Commit

Permalink
Update script and doc to reference the legacy-v3 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Feb 20, 2024
1 parent 8d0a34b commit 1106875
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: RxPlayer Tests

on:
push:
branches: [ master, next ]
branches: [legacy-v3]
pull_request:
types: [opened, synchronize, reopened]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SonarCloud analysis
on:
push:
branches:
- master, next
- legacy-v3
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand Down
9 changes: 1 addition & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
42 changes: 20 additions & 22 deletions doc/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 5 additions & 11 deletions scripts/update_gh-pages_demo
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -22,17 +22,17 @@ 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

# Generate demo
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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -129,4 +123,4 @@ else
echo "nothing to do on the gh-pages branch"
fi

git checkout master
git checkout legacy-v3
11 changes: 5 additions & 6 deletions scripts/update_gh-pages_doc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -22,17 +22,17 @@ 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

# Generate documentation
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

Expand All @@ -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
Expand Down Expand Up @@ -103,4 +102,4 @@ else
echo "nothing to do on the gh-pages branch"
fi

git checkout master
git checkout legacy-v3

0 comments on commit 1106875

Please sign in to comment.