bitmovin-player-ui 3.53.0 → 3.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/PULL_REQUEST_TEMPLATE.md +6 -0
- package/.github/scripts/notifySlackTeam.js +79 -0
- package/.github/workflows/release.yml +19 -1
- package/.github/workflows/tag-release-version.yml +6 -2
- package/CHANGELOG.md +7 -1
- package/artifact/artifact.tar.gz +0 -0
- package/dist/js/bitmovinplayer-ui.js +3 -3
- package/dist/js/bitmovinplayer-ui.min.js +1 -1
- package/dist/js/bitmovinplayer-ui.min.js.map +1 -1
- package/dist/js/framework/components/subtitlesettings/fontfamilyselectbox.js +1 -1
- package/dist/js/framework/main.js +1 -1
- package/package.json +1 -1
- package/src/ts/components/subtitlesettings/fontfamilyselectbox.ts +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
|
|
4
|
+
const jobStatus = process.argv[2];
|
|
5
|
+
const changelogPath = process.argv[3];
|
|
6
|
+
const slackWebhookUrl = process.argv[4];
|
|
7
|
+
const runId = process.argv[5];
|
|
8
|
+
|
|
9
|
+
const failureSlackChannelId = 'CGRK9DV7H';
|
|
10
|
+
const successSlackChannelId = 'C0LJ16JBS';
|
|
11
|
+
|
|
12
|
+
fs.readFile(changelogPath, 'utf8', (err, fileContent) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
throw err;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const changelogContent = parseChangelogEntry(fileContent);
|
|
18
|
+
const releaseVersion = parseReleaseVersion(fileContent);
|
|
19
|
+
sendSlackMessage(releaseVersion, changelogContent);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function parseReleaseVersion(fileContent) {
|
|
23
|
+
const regex = /##\s\[(\d+\.\d+.\d+)\]/;
|
|
24
|
+
const releaseVersion = fileContent.match(regex);
|
|
25
|
+
|
|
26
|
+
return releaseVersion[1];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function parseChangelogEntry(fileContent) {
|
|
30
|
+
// The regex looks for the first paragraph starting with "###" until it finds
|
|
31
|
+
// a paragraph starting with "##".
|
|
32
|
+
// For some reason it also matches 2 chars at the end. With the .slice
|
|
33
|
+
// those 2 chars get removed from the string.
|
|
34
|
+
const regex = /###(.)*[\s\S]*?(?=\s##\s\[v*?)/;
|
|
35
|
+
|
|
36
|
+
let changelogContent = fileContent.match(regex);
|
|
37
|
+
changelogContent = changelogContent.slice(0, -1);
|
|
38
|
+
return changelogContent.toString();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function sendSlackMessage(releaseVersion, changelogContent) {
|
|
42
|
+
let message;
|
|
43
|
+
let slackChannelId;
|
|
44
|
+
if (jobStatus === 'success') {
|
|
45
|
+
slackChannelId = successSlackChannelId
|
|
46
|
+
message = `Changelog v${releaseVersion}\n${changelogContent}`
|
|
47
|
+
} else {
|
|
48
|
+
slackChannelId = failureSlackChannelId
|
|
49
|
+
message = `Release v${releaseVersion} failed.\nPlease check https://github.com/bitmovin/bitmovin-player-ui/actions/runs/${runId}`
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const sampleData = JSON.stringify({
|
|
53
|
+
"channel": slackChannelId,
|
|
54
|
+
"message": message
|
|
55
|
+
});
|
|
56
|
+
const options = {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
headers: {
|
|
59
|
+
'Content-Type': 'application/json',
|
|
60
|
+
'Accept': "application/json",
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var req = https.request(slackWebhookUrl, options, (res) => {
|
|
65
|
+
console.log('statusCode:', res.statusCode);
|
|
66
|
+
console.log('headers:', res.headers);
|
|
67
|
+
|
|
68
|
+
res.on('data', (d) => {
|
|
69
|
+
process.stdout.write(d);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
req.on('error', (e) => {
|
|
74
|
+
console.error(e);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
req.write(sampleData);
|
|
78
|
+
req.end();
|
|
79
|
+
}
|
|
@@ -16,7 +16,9 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
18
|
- name: Checkout
|
|
19
|
-
uses: actions/checkout@
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
ref: develop
|
|
20
22
|
|
|
21
23
|
- uses: actions/download-artifact@v3
|
|
22
24
|
with:
|
|
@@ -32,3 +34,19 @@ jobs:
|
|
|
32
34
|
env:
|
|
33
35
|
NPM_DRY_RUN: false
|
|
34
36
|
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Notify team
|
|
39
|
+
run: node .github/scripts/notifySlackTeam.js 'success' 'CHANGELOG.md' ${{ secrets.RELEASE_SUCCESS_SLACK_WEBHOOK }}
|
|
40
|
+
|
|
41
|
+
handle_failure:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
needs: [test_and_build, download_and_publish]
|
|
44
|
+
if: ${{ always() && (needs.download_and_publish.result == 'failure' || needs.test_and_build.result == 'failure') }}
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout
|
|
47
|
+
uses: actions/checkout@v4
|
|
48
|
+
with:
|
|
49
|
+
ref: develop
|
|
50
|
+
|
|
51
|
+
- name: Notify team
|
|
52
|
+
run: node .github/scripts/notifySlackTeam.js 'failure' 'CHANGELOG.md' ${{ secrets.RELEASE_FAILURE_SLACK_WEBHOOK }} ${{ github.run_id }}
|
|
@@ -13,9 +13,9 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
steps:
|
|
15
15
|
- name: Checkout
|
|
16
|
-
uses: actions/checkout@
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
17
|
with:
|
|
18
|
-
|
|
18
|
+
ssh-key: ${{ secrets.RELEASE_DEPLOY_KEY }}
|
|
19
19
|
ref: develop
|
|
20
20
|
|
|
21
21
|
- name: Install dependencies
|
|
@@ -68,3 +68,7 @@ jobs:
|
|
|
68
68
|
git commit -m "Add release date to changelog"
|
|
69
69
|
git push origin develop
|
|
70
70
|
git push origin --tags
|
|
71
|
+
|
|
72
|
+
- name: Notify failure
|
|
73
|
+
if: ${{ failure() }}
|
|
74
|
+
run: node .github/scripts/notifySlackTeam.js 'failure' 'CHANGELOG.md' ${{ secrets.RELEASE_FAILURE_SLACK_WEBHOOK }} ${{ github.run_id }}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [3.54.0] - 2024-02-01
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- FCC subtitle settings menu showing two options with the same value
|
|
11
|
+
- Invalid release workflow file
|
|
12
|
+
|
|
13
|
+
## [3.53.0] - 2024-01-03
|
|
8
14
|
|
|
9
15
|
### Added
|
|
10
16
|
- Automate release on every PR merge to develop
|
package/artifact/artifact.tar.gz
CHANGED
|
Binary file
|