mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-11-25 05:09:15 +00:00
rework PR handling slightly
This commit is contained in:
@@ -80,7 +80,7 @@ jobs:
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
poetry dynamic-versioning
|
||||
DECKY_REPO="${{ github.repository }}" DECKY_BRANCH="${{ github.event.number && format('PR{0}/{1}', github.event.number, github.head_ref) || github.ref_name }}" ${{ inputs.noconsole == true && 'DECKY_NOCONSOLE=1 ' || '' }}pyinstaller pyinstaller.spec
|
||||
DECKY_REPO="${{ github.repository }}" DECKY_BRANCH="${{ github.event.number && github.head_ref || github.ref_name }}" DECKY_PR="${{ github.event.number }}" ${{ inputs.noconsole == true && 'DECKY_NOCONSOLE=1 ' || '' }}pyinstaller pyinstaller.spec
|
||||
echo Builds:
|
||||
ls ./dist
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ class Updater:
|
||||
self.isSupported: bool = ON_LINUX
|
||||
self.repo = getenv('DECKY_REPO', 'SteamDeckHomebrew/decky-loader')
|
||||
self.git_branch = getenv('DECKY_BRANCH', 'dirty')
|
||||
self.git_pr = getenv('DECKY_PR', None)
|
||||
|
||||
try:
|
||||
self.currentBranch = self.get_branch(self.context.settings)
|
||||
@@ -98,6 +99,7 @@ class Updater:
|
||||
"current": self.localVer,
|
||||
"repo": self.repo,
|
||||
"gitBranch": self.git_branch,
|
||||
"gitPR": self.git_pr,
|
||||
"remote": self.remoteVer,
|
||||
"all": self.allRemoteVers,
|
||||
"updatable": self.localVer != "unknown" and self.localVer != "dev",
|
||||
|
||||
@@ -7,6 +7,7 @@ noconsole_str = os.getenv('DECKY_NOCONSOLE', '0')
|
||||
noconsole = bool(noconsole_str)
|
||||
repo = os.getenv('DECKY_REPO', 'SteamDeckHomebrew/decky-loader')
|
||||
branch = os.getenv('DECKY_BRANCH', 'main')
|
||||
pr = os.getenv('DECKY_PR', None)
|
||||
with open('build_config.py', 'w') as f:
|
||||
f.write(f"""
|
||||
import os
|
||||
@@ -15,6 +16,8 @@ os.environ['DECKY_PACKAGED_BUILD'] = '1'
|
||||
# Build info
|
||||
os.environ['DECKY_REPO'] = {repr(repo)}
|
||||
os.environ['DECKY_BRANCH'] = {repr(branch)}
|
||||
if pr is not None:
|
||||
os.environ['DECKY_PR'] = {repr(pr)}
|
||||
|
||||
# Windows-specific
|
||||
os.environ['DECKY_NOCONSOLE'] = {repr(noconsole_str)}
|
||||
|
||||
@@ -58,7 +58,8 @@ export default function GeneralSettings({
|
||||
<DialogControlsSectionHeader>{t('SettingsGeneralIndex.about.header')}</DialogControlsSectionHeader>
|
||||
<Field label={t('SettingsGeneralIndex.about.decky_version')} focusable={true}>
|
||||
<div style={{ color: 'var(--gpSystemLighterGrey)' }}>
|
||||
{versionInfo?.current} ({versionInfo?.repo}#{versionInfo?.gitBranch})
|
||||
{versionInfo?.current} ({versionInfo?.repo}#{versionInfo?.gitBranch}
|
||||
{versionInfo?.gitPR ? ` (#${versionInfo.gitPR})` : ''})
|
||||
</div>
|
||||
</Field>
|
||||
</DialogControlsSection>
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface VerInfo {
|
||||
current: string;
|
||||
repo: string;
|
||||
gitBranch: string;
|
||||
gitPR: string | null;
|
||||
remote: RemoteVerInfo | null;
|
||||
all: RemoteVerInfo[] | null;
|
||||
updatable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user