Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
name: Wpf Continuous Delivery

on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- 'v**'

jobs:

Expand Down Expand Up @@ -100,7 +101,11 @@ jobs:

- name: Install ffmpeg
run: |
curl https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip -O ${{github.workspace}}\ffmpeg-release-essentials.zip
if (Test-Path "${{github.workspace}}\TubeLoadr\Downloadtools") {}
else {
mkdir ${{github.workspace}}\TubeLoadr\Downloadtools
}
curl "https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip" -L -O ${{github.workspace}}\ffmpeg-release-essentials.zip
7z e ${{github.workspace}}\ffmpeg-release-essentials.zip -o${{github.workspace}}\ffmpeg-release-essentials
move ${{github.workspace}}\ffmpeg-release-essentials\*.exe ${{github.workspace}}\TubeLoadr\Downloadtools

Expand All @@ -119,9 +124,13 @@ jobs:

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration /p:Platform=$env:Platform
env:
Configuration: Release
Platform: x64

- name: Clean build environment
run: dotnet clean --configuration Release

# Create the app package by building and packaging the Windows Application Packaging project
- name: Setup VS Dev Environment
Expand Down
5 changes: 3 additions & 2 deletions TubeLoadr/Services/GitHub/UpdateService.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Octokit;
using System;
using System.Diagnostics;
using System.Reflection;
using System.Threading.Tasks;

namespace TubeLoadr.Services.GitHub
Expand Down Expand Up @@ -29,9 +30,9 @@ public async Task<bool> CheckGitHubNewerVersion()
bool versionState = false;
GitHubClient client = new GitHubClient(new ProductHeaderValue("TubeLoadrApp"));

//int index = Assembly.GetEntryAssembly().GetName().Version.ToString().LastIndexOf(".");
int index = Assembly.GetEntryAssembly().GetName().Version.ToString().LastIndexOf(".");

Version localVersion = new Version(ThisAssembly.AssemblyVersion);
Version localVersion = new Version(Assembly.GetEntryAssembly().GetName().Version.ToString().Substring(0, index));

var latest = await client.Repository.Release.GetLatest("Foffa0", "TubeLoadr");
Version latestGitHubVersion = new Version(latest.TagName.Substring(1));
Expand Down
5 changes: 3 additions & 2 deletions TubeLoadr/ViewModels/AboutViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Windows.Input;
using System.Reflection;
using System.Windows.Input;
using TubeLoadr.Commands;

namespace TubeLoadr.ViewModels
Expand All @@ -17,7 +18,7 @@ public string Version

public AboutViewModel()
{
Version = ThisAssembly.AssemblyVersion;
Version = Assembly.GetEntryAssembly().GetName().Version.ToString();
OpenBrowserCommand = new OpenBrowserCommand();
}
}
Expand Down
9 changes: 9 additions & 0 deletions TubeLoadr/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ public MainViewModel(NavigationStore navigationStore, NavigationService<Download

Application.Current.MainWindow.StateChanged += WindowStateChanged;

if (Application.Current.MainWindow.WindowState != WindowState.Maximized)
{
WindowStateSymbol = "🗗";
}
else
{
WindowStateSymbol = "☐";
}

NewerVersionAvailable = false;

UpdateCheckCommand.Execute(this);
Expand Down
2 changes: 1 addition & 1 deletion TubeLoadrSetup/TubeLoadrSetup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -803,4 +803,4 @@
}
}
}
}
}
Loading