-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CKAN client version now supplied by Meta.Version();
Also fixed the build system so this actually gets found again.
- Loading branch information
Showing
6 changed files
with
52 additions
and
27 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,27 @@ | ||
namespace CKAN { | ||
using System; | ||
using System.Reflection; | ||
|
||
public static class Meta { | ||
/// <summary> | ||
/// Returns the version of the CKAN.dll used. | ||
/// </summary> | ||
|
||
public static string Version() { | ||
|
||
var assembly = Assembly.GetExecutingAssembly(); | ||
|
||
// SeriouslyLongestClassNamesEverThanksMicrosoft | ||
var attr = (AssemblyInformationalVersionAttribute[]) assembly.GetCustomAttributes (typeof(AssemblyInformationalVersionAttribute), false); | ||
|
||
if (attr.Length == 0 || attr [0].InformationalVersion == null) { | ||
// Dunno the version. Some dev probably built it. | ||
return "development"; | ||
} else { | ||
return attr[0].InformationalVersion; | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
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
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