Skip to content

Commit

Permalink
Merge branch 'openbullet:master' into issue-report
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvino authored Jul 4, 2024
2 parents 9993866 + 995e81e commit c0c11bc
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 79 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

# Checkout the repository
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.release/*'
file_glob: true
release_name: ${{ env.VERSION }}
tag: ${{ env.VERSION }}
overwrite: true
prerelease: false
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

# Checkout the repository
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -71,6 +71,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '.release/*'
file_glob: true
release_name: ${{ env.VERSION }}
tag: ${{ env.VERSION }}
overwrite: true
prerelease: true
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/conflict-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Merge Conflict Labeler

on:
push:
branches:
- master
pull_request_target:
branches:
- master
types: [synchronize]

jobs:
label:
name: Labeling
runs-on: ubuntu-latest
if: ${{ github.repository == 'openbullet/OpenBullet2' }}
permissions:
contents: read
pull-requests: write
steps:
- name: Apply label
uses: eps1lon/actions-label-merge-conflict@v3
with:
dirtyLabel: 'merge-conflict'
commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
10 changes: 5 additions & 5 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ name: .NET

jobs:
test:
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Unittests
run: dotnet test
37 changes: 2 additions & 35 deletions OpenBullet2.Native.Updater/Helpers/FileSystemHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,45 +71,12 @@ public static async Task CleanupInstallationFolderAsync()
}
}
});

}
// If the file does not exist, we will delete everything except the whitelisted files and folders.
// If the file does not exist, skip the deletion
else
{
AnsiConsole.MarkupLine(
"[yellow]build-files.txt not found, cleaning up everything not in the whitelist...[/]");

AnsiConsole.Status()
.Start("[yellow]Deleting...[/]", ctx =>
{
foreach (var entry in Directory.EnumerateFileSystemEntries(Directory.GetCurrentDirectory()))
{
var isDirectory = (File.GetAttributes(entry) & FileAttributes.Directory) == FileAttributes.Directory;

// If it's appsettings.json or the UserData folder, disregard it
if (entry == "appsettings.json" || entry.StartsWith("UserData"))
{
continue;
}

// If it's the current executable, disregard it
if (entry == Process.GetCurrentProcess().MainModule?.FileName)
{
continue;
}

ctx.Status($"Deleting {entry}...");

if (isDirectory)
{
Directory.Delete(entry, true);
}
else
{
File.Delete(entry);
}
}
});
"[yellow]build-files.txt not found, skipping file deletion...[/]");
}
}

Expand Down
2 changes: 1 addition & 1 deletion OpenBullet2.Native/OpenBullet2.Native.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<PackageReference Include="AvalonEdit" Version="6.3.0.90" />
<PackageReference Include="HtmlSanitizer" Version="8.1.866-beta" />
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
<PackageReference Include="MahApps.Metro.IconPacks" Version="5.0.0" />
<PackageReference Include="MahApps.Metro.IconPacks" Version="4.8.0" />
<PackageReference Include="MahApps.Metro.SimpleChildWindow" Version="2.2.1" />
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6"/>
Expand Down
39 changes: 3 additions & 36 deletions OpenBullet2.Web.Updater/Helpers/FileSystemHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,45 +71,12 @@ public static async Task CleanupInstallationFolderAsync()
}
}
});

}
// If the file does not exist, we will delete everything except the whitelisted files and folders.
// If the file does not exist, skip the deletion
else
{
{
AnsiConsole.MarkupLine(
"[yellow]build-files.txt not found, cleaning up everything not in the whitelist...[/]");

AnsiConsole.Status()
.Start("[yellow]Deleting...[/]", ctx =>
{
foreach (var entry in Directory.EnumerateFileSystemEntries(Directory.GetCurrentDirectory()))
{
var isDirectory = (File.GetAttributes(entry) & FileAttributes.Directory) == FileAttributes.Directory;

// If it's appsettings.json or the UserData folder, disregard it
if (entry == "appsettings.json" || entry.StartsWith("UserData"))
{
continue;
}

// If it's the current executable, disregard it
if (entry == Process.GetCurrentProcess().MainModule?.FileName)
{
continue;
}

ctx.Status($"Deleting {entry}...");

if (isDirectory)
{
Directory.Delete(entry, true);
}
else
{
File.Delete(entry);
}
}
});
"[yellow]build-files.txt not found, skipping file deletion...[/]");
}
}

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ Found a bug or have a feature request? Please help us improve by submitting an i

[![Open an issue](https://img.shields.io/badge/Bug-Report_a_bug-E74C3C.svg)](https://github.com/openbullet/OpenBullet2/issues/new?template=bug-report.yaml&title=%5BBug%5D%3A+) [![Request a feature](https://img.shields.io/badge/Feature-Request_a_feature-2292A4.svg)](https://github.com/openbullet/OpenBullet2/issues/new?template=feature_request.md&title=%5BREQUEST%5D)

## 📊 Stats
![Alt](https://repobeats.axiom.co/api/embed/c51394480e5e3da9259cae343f80dd1c53a8b263.svg "Repobeats analytics image")

## License
This software is licensed under the MIT License.

Expand Down

0 comments on commit c0c11bc

Please sign in to comment.