Skip to content

Commit

Permalink
Update workflows, changelog and remove news from addon.xml
Browse files Browse the repository at this point in the history
- Update make-release workflow
  - Changelog will be used to populate release details
  - Changelog entries to follow Github markdown formatting rules
  - addon.xml updates will preserve whitespace�  - news element in addon.xml will be populated from changelog without issue references
- Updated submit-release workflow
  - addon.xml updates will preserve whitespace
  - news element in addon.xml will be populated from changelog without issue references
    - news is also used for repository PRs as part of submit-release workflow�    - Github references either need to be removed or updated. Removed for simplicity
  • Loading branch information
MoojMidge committed Jan 25, 2024
1 parent 14603bd commit 99594f7
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 181 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ jobs:
- name: Get Changelog
id: changelog
run: |
readarray -t changes < <(xmlstarlet sel -t -v '//news' -n addon.xml)
readarray -t changes < <(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt)
echo "body<<${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_OUTPUT
for change in "${changes[@]}"; do
echo "${change}" >> $GITHUB_OUTPUT
done
news=$(printf '%s\n' "${changes[@]}" | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
echo "${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_OUTPUT
working-directory: ${{ github.event.repository.name }}

Expand All @@ -54,6 +55,8 @@ jobs:
mv .git ..
rm -rf .??*
rm *.md
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
filename=${{ github.event.repository.name }}-${version}.zip
cd ..
Expand All @@ -75,8 +78,10 @@ jobs:
mv .git ..
rm -rf .??*
rm *.md
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+unofficial.1" addon.xml
xmlstarlet ed -L -P -u '/addon/@version' -v "${version}+unofficial.1" addon.xml
filename=${{ github.event.repository.name }}-${version}.unofficial.1.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
Expand All @@ -93,11 +98,13 @@ jobs:
mv .git ..
rm -rf .??*
rm *.md
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
xmlstarlet ed -L -P -u '/addon/@version' -v "${version}+matrix.1" addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -P -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
filename=${{ github.event.repository.name }}-${version}.matrix.1.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
Expand All @@ -118,11 +125,13 @@ jobs:
mv .git ..
rm -rf .??*
rm *.md
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.unofficial.1" addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
xmlstarlet ed -L -P -u '/addon/@version' -v "${version}+matrix.unofficial.1" addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -P -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
filename=${{ github.event.repository.name }}-${version}.matrix.unofficial.1.zip
cd ..
zip -r $filename ${{ github.event.repository.name }}
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/submit-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
rm *.md
git add .
git commit -m "Remove Unwanted Files"
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
git add .
git commit -m "Update news"
working-directory: ${{ github.event.repository.name }}

- name: Submit to Official Repository (Nexus)
Expand All @@ -74,11 +78,17 @@ jobs:
rm -rf .??*
mv ../.git .
rm *.md
git add .
git commit -m "Remove Unwanted Files"
news=$(awk '/^## /{rel_num++} {if(rel_num==2){exit} if(rel_num==1){print}}' changelog.txt | sed -E 's/ ?#[[:digit:]]+[., ]?//;s/\r//')
xmlstarlet ed -L -P -u '/addon/extension[@point="xbmc.addon.metadata"]/news' -v "${news:0:1500}" addon.xml
git add .
git commit -m "Update news"
version=$(xmlstarlet sel -t -v 'string(/addon/@version)' addon.xml)
xmlstarlet ed -L -u '/addon/@version' -v "${version}+matrix.1" addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
xmlstarlet ed -L -P -u '/addon/@version' -v "${version}+matrix.1" addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="xbmc.python"]/@version' -v '3.0.0' addon.xml
xmlstarlet ed -L -P -u '/addon/requires/import[@addon="inputstream.adaptive"]/@version' -v '19.0.0' addon.xml
xmlstarlet ed -L -P -d '/addon/requires/import[@addon="script.module.infotagger"]' addon.xml
git add .
git commit -m "Kodi 19 Patch"
working-directory: ${{ github.event.repository.name }}
Expand Down
35 changes: 1 addition & 34 deletions addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,7 @@
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<news>
### New
- Add display of extra video information (premieres, views, comments, likes) #18, #464, #503
- Add support for Clips #450
- Add ability to combine playlists #480
- Add support for timestamps in links #502
- Add initial support for higher bitrate streams #505
- Add ability to limit video FPS at max resolution #539
- Add local Watch Later and History for use when not logged in or custom playlist not set
- Update main menu items:
- New Recommended videos (similar to YouTube home page, will use login if available)
- Old Recommended videos renamed to Related videos (requires local/remote history enabled)
- Popular right now renamed to Trending

### Changed
- Local history made optional and enabled by default
- Existing user data will be lost due to changes in data format:
- Search, local history, and local watch later is stored per user
- Function and data cache will be wiped (will also become per user in future)
- Disable OPUS audio by default #537

### Fixed
- Fix sharing links #115, #250, #538
- Fix date and sorting issues #411, #425, #434
- Fix issue with switching between H264/AV1 streams #532
- Fix prompt for subtitles #534
- Fix issues with corrupt user data #536
- Fix issues with live streams #530, #540
- Fix issues with loading large playlists #545
- Fix Recommendations, Related Videos, and Auto-play next #508
- Fix queuing from current playlist #549
- Fix issues with randomising playlists #485
- Workaround for crashes #113, #540
</news>
<news></news>
<assets>
<icon>resources/media/icon.png</icon>
<fanart>resources/media/fanart.jpg</fanart>
Expand Down
Loading

0 comments on commit 99594f7

Please sign in to comment.