Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into update-alpha-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Apr 11, 2024
2 parents 49661b5 + 74b7628 commit 6a86be5
Show file tree
Hide file tree
Showing 380 changed files with 18,764 additions and 12,067 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ name: build-dev
on:
pull_request:
push:
branches:
- master
- "*.*.z"

jobs:
dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand All @@ -22,7 +19,7 @@ jobs:
run: npm run ropm
- name: Build app
run: npm run build
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Jellyfin-Roku-dev-${{ github.sha }}
path: ${{ github.workspace }}/build/staging
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand All @@ -23,7 +23,7 @@ jobs:
run: npm run ropm
- name: Build app for production
run: npm run build-prod
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }}
path: ${{ github.workspace }}/build/staging
Expand Down
235 changes: 235 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
name: "Create PR to bump version"

on:
workflow_dispatch:
inputs:
targetBranch:
description: 'Target Branch'
required: true
type: choice
options:
- bugfix
- master
versionType:
description: 'What Version to Bump'
required: true
type: choice
options:
- build
- minor
- major

jobs:
build:
if: ${{ github.event.inputs.versionType == 'build' }}
runs-on: ubuntu-latest
steps:
# Setup
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install required packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: jq
- name: Save targetBranch to env
if: github.event.inputs.targetBranch != 'bugfix'
run: echo "targetBranch=${{ github.event.inputs.targetBranch }}" >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old minor_version from manifest
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "oldMinor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old build_version from manifest
run: awk 'BEGIN { FS="=" } /^build_version/ { print "oldBuild="$2; }' manifest >> $GITHUB_ENV
# Bugfix branch
- name: Save bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "bugfixBranch=${{ env.oldMajor }}.${{ env.oldMinor }}.z" >> $GITHUB_ENV
- name: Update targetBranch with actual bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "targetBranch=${{ env.bugfixBranch }}" >> $GITHUB_ENV
- name: Checkout bugfix branch
if: github.event.inputs.targetBranch == 'bugfix'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ env.targetBranch }}
# Save old version again if needed
- name: Find and save old major_version from manifest
if: github.event.inputs.targetBranch == 'bugfix'
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old minor_version from manifest
if: github.event.inputs.targetBranch == 'bugfix'
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "oldMinor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old build_version from manifest
if: github.event.inputs.targetBranch == 'bugfix'
run: awk 'BEGIN { FS="=" } /^build_version/ { print "oldBuild="$2; }' manifest >> $GITHUB_ENV
# Calculate new version
- name: Calculate new build_version
run: echo "newBuild=$((${{ env.oldBuild }} + 1))" >> $GITHUB_ENV
- name: Save new version to env var
run: echo "newVersion=${{ env.oldMajor }}.${{ env.oldMinor }}.${{ env.newBuild }}" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest build_version
run: sed -i "s/build_version=.*/build_version=${{ env.newBuild }}/g" manifest
- name: Update package-lock.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package-lock.json version 2
run: echo "$( jq '.packages."".version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package.json )" > package.json
- name: Update Makefile version
run: sed -i "s/VERSION := .*/VERSION := ${{ env.newVersion }}/g" Makefile
# Create PR
- name: Save new branch name to env
run: echo "newBranch=bump-${{ github.event.inputs.targetBranch }}-to-${{ env.newVersionSlug }}" >> $GITHUB_ENV
- name: Create PR with new version
env:
GH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b "${{ env.newBranch }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
git push --set-upstream origin "${{ env.newBranch }}"
gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }}
minor:
if: ${{ github.event.inputs.versionType == 'minor' }}
runs-on: ubuntu-latest
steps:
# Setup
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install jq to update json
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: jq
- name: Save targetBranch to env
if: github.event.inputs.targetBranch != 'bugfix'
run: echo "targetBranch=${{ github.event.inputs.targetBranch }}" >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old minor_version from manifest
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "oldMinor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old build_version from manifest
run: awk 'BEGIN { FS="=" } /^build_version/ { print "oldBuild="$2; }' manifest >> $GITHUB_ENV
# Bugfix branch
- name: Save bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "bugfixBranch=${{ env.oldMajor }}.${{ env.oldMinor }}.z" >> $GITHUB_ENV
- name: Update targetBranch with actual bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "targetBranch=${{ env.bugfixBranch }}" >> $GITHUB_ENV
- name: Checkout bugfix branch
if: github.event.inputs.targetBranch == 'bugfix'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ env.targetBranch }}
# Calculate new version
- name: Calculate new build_version
run: echo "newMinor=$((${{ env.oldMinor }} + 1))" >> $GITHUB_ENV
- name: Save new version to env var
run: echo "newVersion=${{ env.oldMajor }}.${{ env.newMinor }}.0" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest minor_version
run: sed -i "s/minor_version=.*/minor_version=${{ env.newMinor }}/g" manifest
- name: Update manifest build_version
run: sed -i "s/build_version=.*/build_version=0/g" manifest
- name: Update package-lock.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package-lock.json version 2
run: echo "$( jq '.packages."".version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package.json )" > package.json
- name: Update Makefile version
run: sed -i "s/VERSION := .*/VERSION := ${{ env.newVersion }}/g" Makefile
# Create PR
- name: Save new branch name to env
run: echo "newBranch=bump-${{ github.event.inputs.targetBranch }}-to-${{ env.newVersionSlug }}" >> $GITHUB_ENV
- name: Create PR with new version
env:
GH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b "${{ env.newBranch }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
git push --set-upstream origin "${{ env.newBranch }}"
gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }}
major:
if: ${{ github.event.inputs.versionType == 'major' }}
runs-on: ubuntu-latest
steps:
# Setup
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install jq to update json
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: jq
- name: Save targetBranch to env
if: github.event.inputs.targetBranch != 'bugfix'
run: echo "targetBranch=${{ github.event.inputs.targetBranch }}" >> $GITHUB_ENV
# Save old version
- name: Find and save old major_version from manifest
run: awk 'BEGIN { FS="=" } /^major_version/ { print "oldMajor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old minor_version from manifest
run: awk 'BEGIN { FS="=" } /^minor_version/ { print "oldMinor="$2; }' manifest >> $GITHUB_ENV
- name: Find and save old build_version from manifest
run: awk 'BEGIN { FS="=" } /^build_version/ { print "oldBuild="$2; }' manifest >> $GITHUB_ENV
# Bugfix branch
- name: Save bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "bugfixBranch=${{ env.oldMajor }}.${{ env.oldMinor }}.z" >> $GITHUB_ENV
- name: Update targetBranch with actual bugfix branch name
if: github.event.inputs.targetBranch == 'bugfix'
run: echo "targetBranch=${{ env.bugfixBranch }}" >> $GITHUB_ENV
- name: Checkout bugfix branch
if: github.event.inputs.targetBranch == 'bugfix'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ env.targetBranch }}
# Calculate new version
- name: Calculate new build_version
run: echo "newMajor=$((${{ env.oldMajor }} + 1))" >> $GITHUB_ENV
- name: Save new version to env var
run: echo "newVersion=${{ env.newMajor }}.0.0" >> $GITHUB_ENV
- name: Save a copy of newVersion without periods to env var
run: echo "newVersionSlug=${{ env.newVersion }}" | sed -e 's/\.//g' >> $GITHUB_ENV
# Update files with new versions
- name: Update manifest major_version
run: sed -i "s/major_version=.*/major_version=${{ env.newMajor }}/g" manifest
- name: Update manifest minor_version
run: sed -i "s/minor_version=.*/minor_version=0/g" manifest
- name: Update manifest build_version
run: sed -i "s/build_version=.*/build_version=0/g" manifest
- name: Update package-lock.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package-lock.json version 2
run: echo "$( jq '.packages."".version = "'"${{ env.newVersion }}"'"' package-lock.json )" > package-lock.json
- name: Update package.json version
run: echo "$( jq '.version = "'"${{ env.newVersion }}"'"' package.json )" > package.json
- name: Update Makefile version
run: sed -i "s/VERSION := .*/VERSION := ${{ env.newVersion }}/g" Makefile
# Create PR
- name: Save new branch name to env
run: echo "newBranch=bump-${{ github.event.inputs.targetBranch }}-to-${{ env.newVersionSlug }}" >> $GITHUB_ENV
- name: Create PR with new version
env:
GH_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
run: |-
git config user.name "jellyfin-bot"
git config user.email "[email protected]"
git checkout -b "${{ env.newBranch }}"
git add .
git commit -m "Bump ${{ github.event.inputs.versionType }} version"
git push --set-upstream origin "${{ env.newBranch }}"
gh pr create --title "Bump ${{ github.event.inputs.targetBranch }} branch to ${{ env.newVersion }}" --body "Bump version to prep for next release." --label ignore-changelog --base ${{ env.targetBranch }}
6 changes: 3 additions & 3 deletions .github/workflows/deploy-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Pages
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload artifact
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
# Only upload the api docs folder
path: "docs/api"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 # v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: npm ci
- name: Install roku package dependencies
run: npx ropm install
- uses: xt0rted/markdownlint-problem-matcher@98d94724052d20ca2e06c091f202e4c66c3c59fb # v2
- uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3
- name: Lint markdown files
run: npm run lint-markdown
spelling:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand All @@ -73,7 +73,7 @@ jobs:
run: npm run ropm
- name: Build app for production
run: npm run build-prod
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }}
path: ${{ github.workspace }}/build/staging
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/roku-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "lts/*"
cache: "npm"
Expand All @@ -27,7 +27,7 @@ jobs:
if: env.BRANCH_NAME == 'master'
run: npm run build-prod
- name: Use Java 17
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4
with:
distribution: "temurin"
java-version: "17"
Expand Down
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// set "brightscript.debug.raleTrackerTaskFileLocation": "/absolute/path/to/rale/TrackerTask.xml" in your vscode user settings
// set the below field to true
"injectRaleTrackerTask": false,
"injectRdbOnDeviceComponent": true,
//WARNING: don't edit this value. Instead, set "brightscript.debug.host": "YOUR_HOST_HERE" in your vscode user settings
//"host": "${promptForHost}",
//WARNING: don't edit this value. Instead, set "brightscript.debug.password": "YOUR_PASSWORD_HERE" in your vscode user settings
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# If you want to get_images, you'll also need convert from ImageMagick
##########################################################################

VERSION := 2.0.2
VERSION := 2.0.5

## usage

Expand Down Expand Up @@ -76,6 +76,7 @@ remove:

.PHONY: screenshot
screenshot:
$(CURL_LOGGED_CMD) -F mysubmit=Screenshot "http://$(ROKU_DEV_TARGET)/plugin_inspect"
$(CURL_LOGGED_CMD) -o screenshot.jpg "http://$(ROKU_DEV_TARGET)/pkgs/dev.jpg"

.PHONY: deploy
Expand Down
2 changes: 1 addition & 1 deletion bsconfig-tdd-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
],
"diagnosticFilters": ["node_modules/**/*", "**/roku_modules/**/*"],
"autoImportComponentScript": true,
"allowBrighterScriptInBrightScript": true,
"createPackage": false,
"stagingFolderPath": "build",
"retainStagingDir": true,
"plugins": ["rooibos-roku"],
"rooibos": {
"isRecordingCodeCoverage": false,
Expand Down
5 changes: 3 additions & 2 deletions bsconfig-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
{
"src": "settings/**/*",
"dest": "settings"
}
},
"manifest"
],
"diagnosticFilters": ["node_modules/**/*", "**/roku_modules/**/*"],
"autoImportComponentScript": true,
"allowBrighterScriptInBrightScript": true,
"stagingFolderPath": "build",
"retainStagingDir": true,
"plugins": ["rooibos-roku"],
"rooibos": {
"isRecordingCodeCoverage": false,
Expand Down
Loading

0 comments on commit 6a86be5

Please sign in to comment.