Skip to content

Commit

Permalink
Migrate Version to Git revision
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Mar 26, 2024
1 parent 8f92d7e commit e46ca3e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 12 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,25 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Git Checkout / MPE / XPath / Tools
uses: actions/checkout@v4
with:
repository: andrewjswan/MPE
path: MPE

- name: MP folder for MPEMaker
run: |
mkdir "C:\Team MediaPortal"
shell: cmd

- name: Link to MPEMaker
run: |
mklink /J "C:\Team MediaPortal\MediaPortal" "${{ github.workspace }}\MPE\MPEMaker"
shell: cmd

- name: Update Known Extensions
run: |
MPEUpdater.exe
Expand All @@ -45,19 +57,19 @@ jobs:
working-directory: ${{ github.workspace }}\builds
shell: cmd

- name: Build MPE1
run: |
Create_Installer.bat
working-directory: ${{ github.workspace }}\scripts
shell: cmd

- name: Get Version
id: version
run: |
FOR /F "tokens=*" %%i IN ('call ..\MPE\XPath\xpath.cmd "Titan Extended.xmp2" "//PackageClass/GeneralInfo/Version" ^| ..\MPE\Tools\sed "s/ /./g"') DO (ECHO version=%%i >> %GITHUB_OUTPUT%)
working-directory: ${{ github.workspace }}\MPEI
shell: cmd

- name: Build MPE1
run: |
"..\MPE\MPEMaker\MPEMaker.exe" "Titan Extended.xmp2" /B /UpdateXML
working-directory: ${{ github.workspace }}\MPEI
shell: cmd

- name: Upload Artifact / MPE1
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions MPEI/Titan Extended.xmp2
Original file line number Diff line number Diff line change
Expand Up @@ -4849,7 +4849,7 @@ Click Next to continue or Cancel to exit Setup.</Value>
<Major>5</Major>
<Minor>0</Minor>
<Build>1</Build>
<Revision>5</Revision>
<Revision>116</Revision>
</Version>
<ExtensionDescription>Titan Extended adds support for a variety of community plugins to the Titan skin.

Expand All @@ -4860,7 +4860,7 @@ The Titan skin is included in MediaPortal, starting with version 1.3.0 beta.</Ex
Add DWHD Theme by catavolt (experemental)</VersionDescription>
<DevelopmentStatus>Stable</DevelopmentStatus>
<OnlineLocation>https://github.com/MediaPortal/TitanExtended/releases/download/v[Version]/Titan.Extended-[Version].mpe1</OnlineLocation>
<ReleaseDate>2024-03-25T21:21:21</ReleaseDate>
<ReleaseDate>2024-03-26T13:07:34.1555589+02:00</ReleaseDate>
<Tags>titan, skin, widescreen</Tags>
<PlatformCompatibility>AnyCPU</PlatformCompatibility>
<Location>..\builds\Titan Extended-[Version].mpe1</Location>
Expand Down
18 changes: 14 additions & 4 deletions scripts/Create_Installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
Title Creating MediaPortal Titan Extended Installer
ECHO Creating MediaPortal Titan Extended Installer

if "%programfiles(x86)%XXX"=="XXX" goto 32BIT
:: 64-bit
set PROGS=%programfiles(x86)%
goto CONT
:32BIT
set PROGS=%ProgramFiles%
:CONT

IF NOT EXIST "%PROGS%\Team MediaPortal\MediaPortal\" SET PROGS=C:

:: Get version from DLL
FOR /F "tokens=*" %%a IN ('git rev-list HEAD --count') DO SET version=%%a
FOR /F "tokens=*" %%a IN ('git rev-list HEAD --count') DO SET version=%%a

:: Trim version
SET version=%version:~0,-1%
SET version=%version: =%

:: Set version
SET version=5.0.0.%version%
SET version=5.0.1.%version%

:: Build MPE1
"Tools\MPEMaker.exe" "..\MPEI\Titan Extended.xmp2" /B /V=%version% /UpdateXML
"%PROGS%\Team MediaPortal\MediaPortal\MPEMaker.exe" "..\MPEI\Titan Extended.xmp2" /B /V=%version% /UpdateXML
Binary file removed scripts/Tools/CSScriptLibrary.dll
Binary file not shown.
Binary file removed scripts/Tools/Common.Utils.dll
Binary file not shown.
Binary file removed scripts/Tools/Dialogs.dll
Binary file not shown.
Binary file removed scripts/Tools/Ionic.Zip.dll
Binary file not shown.
Binary file removed scripts/Tools/MpeCore.dll
Binary file not shown.
Binary file removed scripts/Tools/Utils.dll
Binary file not shown.

0 comments on commit e46ca3e

Please sign in to comment.