Skip to content

Commit

Permalink
🔖 Update version (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduwardpost authored Jan 4, 2024
1 parent f2b0e5c commit ff96e83
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions uActivityPub/uActivityPub.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Diagnostics;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Manifest;

namespace uActivityPub;

// ReSharper disable once InconsistentNaming
public static class uActivityPub
{
public static string PackageName => "uActivityPub";
Expand All @@ -14,37 +14,38 @@ public class StaticAssetsBoot : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.AdduActivityPubAssets();
builder.AddUActivityPubAssets();
}
}

public static class uSyncStaticAssetsExtensions
public static class USyncStaticAssetsExtensions
{
public static IUmbracoBuilder AdduActivityPubAssets(this IUmbracoBuilder builder)
// ReSharper disable once UnusedMethodReturnValue.Global
public static IUmbracoBuilder AddUActivityPubAssets(this IUmbracoBuilder builder)
{
// don't add if the filter is already there .
if (builder.ManifestFilters().Has<uActivityPubAssetManifestFilter>())
if (builder.ManifestFilters().Has<UActivityPubAssetManifestFilter>())
return builder;

// add the package manifest programatically.
builder.ManifestFilters().Append<uActivityPubAssetManifestFilter>();
builder.ManifestFilters().Append<UActivityPubAssetManifestFilter>();

return builder;
}

internal class uActivityPubAssetManifestFilter : IManifestFilter

// ReSharper disable once MemberCanBePrivate.Global
internal class UActivityPubAssetManifestFilter : IManifestFilter
{
public void Filter(List<PackageManifest> manifests)
{
var assembly = typeof(uActivityPubAssetManifestFilter).Assembly;
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
//string version = fileVersionInfo.ProductVersion;
var assembly = typeof(UActivityPubAssetManifestFilter).Assembly;

manifests.Add(new PackageManifest
{
//PackageId = "uActivityPub",
PackageId = "uActivityPub",
PackageName = uActivityPub.PackageName,
Version = assembly.GetName().Version.ToString(3),
Version = assembly.GetName().Version!.ToString(3),
AllowPackageTelemetry = true,
BundleOptions = BundleOptions.None,
// Scripts = new[]
Expand Down
4 changes: 2 additions & 2 deletions uActivityPub/uActivityPub.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<Product>uActivityPub</Product>
<PackageId>uActivityPub</PackageId>
<Version>1.0.8</Version>
<AssemblyVersion>1.0.8</AssemblyVersion>
<Version>1.0.9</Version>
<AssemblyVersion>1.0.9</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
Expand Down

0 comments on commit ff96e83

Please sign in to comment.