-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added manifest filter to indicate package version and allow package t…
…elemetry
- Loading branch information
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using Umbraco.Cms.Core.Semver; | ||
|
||
namespace Skybrud.Umbraco.GridData { | ||
|
||
/// <summary> | ||
/// Static class with various information and constants about the package. | ||
/// </summary> | ||
public class GridPackage { | ||
|
||
/// <summary> | ||
/// Gets the alias of the package. | ||
/// </summary> | ||
public const string Alias = "Skybrud.Umbraco.GridData"; | ||
|
||
/// <summary> | ||
/// Gets the friendly name of the package. | ||
/// </summary> | ||
public const string Name = "Limbo Grid Data"; | ||
|
||
/// <summary> | ||
/// Gets the version of the package. | ||
/// </summary> | ||
public static readonly Version Version = typeof(GridPackage).Assembly.GetName().Version!; | ||
|
||
/// <summary> | ||
/// Gets the informational version of the package. | ||
/// </summary> | ||
public static readonly string InformationalVersion = FileVersionInfo.GetVersionInfo(typeof(GridPackage).Assembly.Location).ProductVersion!; | ||
|
||
/// <summary> | ||
/// Gets the semantic version of the package. | ||
/// </summary> | ||
public static readonly SemVersion SemVersion = InformationalVersion; | ||
|
||
/// <summary> | ||
/// Gets the URL of the GitHub repository for this package. | ||
/// </summary> | ||
public const string GitHubUrl = "https://github.com/skybrud/Skybrud.Umbraco.GridData/"; | ||
|
||
/// <summary> | ||
/// Gets the URL of the issue tracker for this package. | ||
/// </summary> | ||
public const string IssuesUrl = "https://github.com/skybrud/Skybrud.Umbraco.GridData/issues"; | ||
|
||
/// <summary> | ||
/// Gets the website URL of the package. | ||
/// </summary> | ||
public const string WebsiteUrl = "https://packages.skybrud.dk/skybrud.umbraco.griddata/v5/"; | ||
|
||
/// <summary> | ||
/// Gets the URL of the documentation for this package. | ||
/// </summary> | ||
public const string DocumentationUrl = "https://packages.skybrud.dk/skybrud.umbraco.griddata/v5/docs/"; | ||
|
||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
src/Skybrud.Umbraco.GridData/Manifests/GridManifestFilter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Collections.Generic; | ||
using Umbraco.Cms.Core.Manifest; | ||
|
||
namespace Skybrud.Umbraco.GridData.Manifests { | ||
|
||
/// <inheritdoc /> | ||
public class GridManifestFilter : IManifestFilter { | ||
|
||
/// <inheritdoc /> | ||
public void Filter(List<PackageManifest> manifests) { | ||
manifests.Add(new PackageManifest { | ||
AllowPackageTelemetry = true, | ||
PackageName = GridPackage.Name, | ||
Version = GridPackage.InformationalVersion | ||
}); | ||
} | ||
|
||
} | ||
|
||
} |