Skip to content

Commit

Permalink
Make update_changelog.mjs script
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Sep 3, 2024
1 parent e20bd57 commit 5e0e3cf
Show file tree
Hide file tree
Showing 5 changed files with 643 additions and 9 deletions.
16 changes: 11 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
# Changelog

## Unreleased
## Current dev build: v4.2.0-dev.2024090300

### Features

- Add `cmcd` object to `loadVideo` options to enable CMCD (Common Media Client Data)
[#1461]
- Add `checkManifestIntegrity` `loadVideo` option as a temporary work-around when you
suspect your packager or CDN to sometimes deliver corrupted data [#1471]
- Add `contentProtections` to the `representations` of the tracks API to know if they're
considered encrypted [#1505]
- Add `filterPlayableRepresentations` property to audio and video tracks API to get
information on ALL representations, even those that won't be played [#1501]
- Add `LogFormat` static property to the `RxPlayer` to try improving on bug reports
[#1469]

### Bug fixes

- Detect cases where an encrypted media's codec is not supported specifically when the
media is encrypted and prevent the playback of such contents [#1479]
media is encrypted and prevent the playback of such contents [#1484]
- Work-around the "hulu issue" seen on firefox 129 and 130 (`1911283` and `1912238` on
bugzilla) which also impacted the RxPlayer [#1495]
bugzilla) which also impacted the RxPlayer [#1495, #1498]
- Fix rare cases where the active Period would not be advertised by the RxPlayer [#1502]
- DRM/Compat: Re-create MediaKeys for each content on Philips' NETTV [#1515]
- DRM/Compat: fix content not starting on Safari because key are never considered usable
for a track [#1479, #1512]

### Other improvements

Expand Down Expand Up @@ -1125,8 +1132,7 @@
encrypted content
- eme: fix issue where more than 50 active MediaKeySessions at the same time could lead to
infinite rebuffering when playing back a previous content with multiple encryption keys
- directfile: for directfile contents, don't reset to the preferred audio, text or video
track when the track list changes
- directfile: for directfile contents, don't reset t track when the track list changes
- eme: remove any possibility of collision in the storage of EME initialization data. The
previous behavior could theorically lead some initialization data to be ignored.
- eme: fix typo which conflated an EME "internal-error" key status and an
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"lint:tests": "eslint tests/**/*.js --ignore-pattern '/tests/performance/bundle*'",
"list": "node scripts/list-npm-scripts.mjs",
"prepublishOnly": "npm run build:all",
"releases:changelog": "./scripts/update_changelog.mjs",
"releases:demo": "./scripts/update_gh-pages_demo",
"releases:dev": "./scripts/make-dev-releases",
"releases:doc": "./scripts/update_gh-pages_doc",
Expand Down
73 changes: 69 additions & 4 deletions scripts/make-dev-releases
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,18 @@ fi

current_branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
date=$(date "+%Y%m%d")
dev_branch="release/v${version}-dev.${date}${incr}"
canal_branch="release/v${version}-canal.${date}${incr}"
dev_version="${version}-dev.${date}${incr}"
canal_version="${version}-canal.${date}${incr}"
dev_branch="release/v${dev_version}"
canal_branch="release/v${canal_version}"

if [ -n "$(git status --porcelain doc)" ]; then
echo "ERROR: Please commit your modifications to \"${current_branch}\" first"
exit 1
fi

echo "Creating version: $dev_version and $canal_version"
echo "checking that the branches do not already exist locally or remotely..."
if ! [ -z $(git branch --list "$dev_branch") ]; then
err "Branch name "$dev_branch" already exists locally. Please delete it first."
fi
Expand All @@ -78,14 +87,70 @@ if ! [ -z $(git ls-remote --heads [email protected]:canalplus/rx-player.git "refs/h
err "Branch name "$canal_branch" already exists remotely. Please delete it first."
fi

if npm view rx-player@$version-dev.${date}${incr} >/dev/null 2>&1; then
echo "checking that the versions are not already published on npm..."
if npm view rx-player@$dev_version >/dev/null 2>&1; then
err "Version already published to npm: $version-dev.${date}${incr}"
fi

if npm view rx-player@$version-canal.${date}${incr} >/dev/null 2>&1; then
if npm view rx-player@$canal_version >/dev/null 2>&1; then
err "Version already published to npm: $version-canal.${date}${incr}"
fi

# Make dev Changelog
npm run releases:changelog -- $dev_version -d

$EDITOR CHANGELOG.md

if [ -n "$(git status --porcelain CHANGELOG.md)" ]; then
echo "-- Current CHANGELOG.md Status: --"
echo ""
git status CHANGELOG.md

while :; do
echo ""
echo "We will push this CHANGELOG.md update to ${current_branch}."
REPLY=""
read -p "do you want to continue [y/d/s/a/c/t/h] (h for help) ? " -n 1 -r
echo ""

if [[ $REPLY =~ ^[Hh](elp)?$ ]]; then
echo ""
echo ""
echo "+- help -------------------------------------------------+"
echo "| y: commit and continue |"
echo "| d: see diff |"
echo "| s: see status |"
echo "| a: abort script from here |"
echo "| c: skip CHANGELOG.md update and go to the next step |"
echo "| t: stash this and go to the next step |"
echo "| h: see this help |"
echo "+--------------------------------------------------------+"
elif [[ $REPLY =~ ^[Yy](es)?$ ]]; then
git add CHANGELOG.md
git commit -m "Update CHANGELOG.md for v$dev_version"
git push [email protected]:canalplus/rx-player.git $current_branch
break
elif [[ $REPLY =~ ^[Dd](iff)?$ ]]; then
git diff CHANGELOG.md || true # ignore when return 1
elif [[ $REPLY =~ ^[Ss](tatus)?$ ]]; then
git status CHANGELOG.md
elif [[ $REPLY =~ ^[Aa](bort)?$ ]]; then
echo "exiting"
exit 0
elif [[ $REPLY =~ ^[Cc](heckout)?$ ]]; then
git checkout CHANGELOG.md
elif [[ $REPLY =~ ^([Tt]|([Ss]tash))?$ ]]; then
git stash -u push CHANGELOG.md
break
fi
done
fi

if [ -n "$(git status --porcelain doc)" ]; then
echo "ERROR: Unexpected diff in \"${current_branch}\""
exit 1
fi

git checkout -b ${dev_branch}
./scripts/update-version $version-dev.${date}${incr}
git add --all
Expand Down
2 changes: 2 additions & 0 deletions scripts/make-official-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ else
version=$1
fi

echo "checking that the branche does not already exist locally or remotely..."
if ! [ -z $(git branch --list "release/v$version") ]; then
err "Branch name "release/v$version" already exists locally. Please delete it first."
fi
Expand All @@ -105,6 +106,7 @@ if ! [ -z $(git ls-remote --heads [email protected]:canalplus/rx-player.git "refs/h
err "Branch name "release/v$version" already exists remotely. Please delete it first."
fi

echo "checking that the version are not already published on npm..."
if npm view rx-player@$version >/dev/null 2>&1; then
err "Version already published to npm: $version"
fi
Expand Down
Loading

0 comments on commit 5e0e3cf

Please sign in to comment.