Committing display of build number (testing...)

This commit is contained in:
Rick Falkvinge
2011-12-10 22:45:25 +00:00
parent 051887085e
commit 2bf5c148c2
4 changed files with 26 additions and 45 deletions
-43
View File
@@ -19,34 +19,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basic", "Basic\Basic.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Backend", "Backend\Backend.csproj", "{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}"
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site5-Sep", "Site5-Sep\", "{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
Debug.AspNetCompiler.VirtualPath = "/Site5-Sep"
Debug.AspNetCompiler.PhysicalPath = "Site5-Sep\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\Site5-Sep\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "false"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/Site5-Sep"
Release.AspNetCompiler.PhysicalPath = "Site5-Sep\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\Site5-Sep\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
VWDPort = "1780"
VWDVirtualPath = "/"
StartServerOnDebug = "false"
EndProjectSection
ProjectSection(ProjectDependencies) = postProject
{3A5B5F19-51A5-48CE-A82E-97D5C189E5CB} = {3A5B5F19-51A5-48CE-A82E-97D5C189E5CB}
{13E59551-34AC-43DC-9A03-EF5E4721DC61} = {13E59551-34AC-43DC-9A03-EF5E4721DC61}
{6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1} = {6608C2E6-F841-4CD1-8AB2-28DC3B1DDDD1}
{BA24FAF7-D518-49E8-952A-45595682877E} = {BA24FAF7-D518-49E8-952A-45595682877E}
EndProjectSection
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Site5", "Site5\", "{367F36EA-AE1C-4E15-BAF9-BA75B18B3807}"
ProjectSection(WebsiteProperties) = preProject
TargetFrameworkMoniker = ".NETFramework,Version%3Dv2.0"
@@ -196,21 +168,6 @@ Global
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Any CPU.Build.0 = Release|Any CPU
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B7C7320D-A721-4EA8-83E9-1B09AAFF20E9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Autobuild|.NET.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Autobuild|Any CPU.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Autobuild|Any CPU.Build.0 = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Autobuild|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Autobuild|Mixed Platforms.Build.0 = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Debug|.NET.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Release|.NET.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Release|Any CPU.Build.0 = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DAEDFA45-785C-4BC4-9330-87BE68FAE1E5}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
{367F36EA-AE1C-4E15-BAF9-BA75B18B3807}.Autobuild|.NET.ActiveCfg = Debug|Any CPU
{367F36EA-AE1C-4E15-BAF9-BA75B18B3807}.Autobuild|Any CPU.ActiveCfg = Debug|Any CPU
{367F36EA-AE1C-4E15-BAF9-BA75B18B3807}.Autobuild|Any CPU.Build.0 = Debug|Any CPU
+15
View File
@@ -1,6 +1,7 @@
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Security.Principal" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="Activizr.Logic" %>
@@ -15,6 +16,20 @@
HttpContext.Current.Application["Cultures"] = new string[] { "sv-SE", "en-US", "de-DE", "de-AT", "fi-FI" };
HttpContext.Current.Application["UserRoleCache"] = new Dictionary<int, string[]>();
// Read build number, or set to "Private" if none
try
{
using (StreamReader reader = File.OpenText(HttpContext.Current.Request.MapPath("~/BuildIdentity.txt")))
{
HttpContext.Current.Application["BuildIdentity"] = "Build " + reader.ReadLine();
}
}
catch (Exception)
{
HttpContext.Current.Application["BuildIdentity"] = "Private Build";
}
}
private void Application_End (object sender, EventArgs e)
+3 -1
View File
@@ -8,7 +8,7 @@
<head id="Head1" runat="server">
<!-- fonts -->
<link href='https://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Ubuntu:light,regular,500,bold' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Ubuntu:light,regular,500,bold' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Arimo:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css' />
<!-- jQuery -->
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" ></script>
@@ -165,6 +165,8 @@
<telerik:RadMenuItem runat="server" Text="XYZ Organization Clusters" Permission="All" UserLevel="4" GlobalResourceKey="Menu5_Administration_OrganizationClusters" />
<telerik:RadMenuItem runat="server" Text="XYZ Manage Geography" Permission="All" UserLevel="4" GlobalResourceKey="Menu5_Administration_GeographyTree" />
<telerik:RadMenuItem runat="server" Text="XYZ Access Control Lists" Permission="All" UserLevel="4" GlobalResourceKey="Menu5_Administration_AccessControlLists" />
<telerik:RadMenuItem runat="server" IsSeparator="true" UserLevel="4" />
<telerik:RadMenuItem runat="server" Text="Build# Auto" Permission="All" UserLevel="4" NotaBene="This is a special case -- the build number is dynamically inserted for text" />
</Items>
</telerik:RadMenuItem>
</Items>
+8 -1
View File
@@ -140,7 +140,14 @@ namespace Activizr
continue;
}
item.Text = GetGlobalResourceObject("Menu5", resourceKey).ToString();
if (item.Text == "Build# Auto")
{
item.Text = (string) HttpContext.Current.Application["BuildIdentity"];
}
else
{
item.Text = GetGlobalResourceObject("Menu5", resourceKey).ToString();
}
bool enabled = topLevel;