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
3 changes: 2 additions & 1 deletion Builders/AndroidBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.

using System.IO;
using System.Linq;
using osu.Desktop.Deploy.Uploaders;

namespace osu.Desktop.Deploy.Builders
Expand Down Expand Up @@ -36,7 +37,7 @@ public override void Build()
+ $" -p:AndroidSigningStorePass={codeSigningPassword}";
}

string[] versionParts = Version.Split('.');
string[] versionParts = Version.Split('-').First().Split('.');
string versionCode = versionParts[0].PadLeft(4, '0') + versionParts[1].PadLeft(4, '0') + versionParts[2].PadLeft(1, '0');

RunDotnetPublish($"-p:ApplicationVersion={versionCode} {codeSigningArguments}");
Expand Down
4 changes: 4 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public static void Main(string[] args)
if (args.Length > 2 && !string.IsNullOrEmpty(args[2]))
Enum.TryParse(args[2], true, out targetPlatform);

// ensure version has a suffix
if (version.Split('-').Length == 1)
version = $"{version}-lazer";
Comment on lines +102 to +104
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the Android builder is going to like this:

string[] versionParts = Version.Split('.');
string versionCode = versionParts[0].PadLeft(4, '0') + versionParts[1].PadLeft(4, '0') + versionParts[2].PadLeft(1, '0');
RunDotnetPublish($"-p:ApplicationVersion={versionCode} {codeSigningArguments}");

Also note that both the Velopack and GH uploaders match the release by tag with this name:

+ $" --tag=\"{version}\""
+ $" --releaseName=\"{version}\""

if (targetRelease == null || targetRelease.TagName != version)

I don't know how this behaves exactly so have you tested this? Android/iOS is a much of a muchness but at least in-so-far as you've tested you can actually upload vpk releases to GH with your intended tagging workflow.

Because, it does mean that the if condition doesn't actually make much sense here - if version is arriving without a suffix then releases aren't going to get matched.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the Android builder is going to like this:

may need custom handling, didn't notice this.

Also note that both the Velopack and GH uploaders match the release by tag with this name:

Tag is probably what we want, but maybe not release name, I'l check on this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed the android builder issue. The other issue you bring up doesn't seem like it needs any changes, but I haven't done a test of this yet.

One thing I'd want to confirm is that it is okay to have the suffix in the release asset filenames?

2025-06-16 05 55 53@2x

ie does velopack manage things based on PackageId and this is a non-issue as a result?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's fine. The asset filenames don't matter as long as it's velopack that's generating them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I think we could get this in and do a test run (then pull the build quickly if there's any issues).


Console.ResetColor();
Console.WriteLine($"Increment Version: {IncrementVersion}");
Console.WriteLine($"Signing Certificate: {WindowsCodeSigningMetadataPath}");
Expand Down