CrazyIter_Bin 2 년 전
부모
커밋
1db4b0e291
3개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 0
      TEAMModelOS.SDK/Context/Configuration/Option.cs
  2. 2 0
      TEAMModelOS/Controllers/System/CoreController.cs
  3. 2 1
      TEAMModelOS/appsettings.json

+ 1 - 0
TEAMModelOS.SDK/Context/Configuration/Option.cs

@@ -20,6 +20,7 @@ namespace TEAMModelOS.Models
         public string HostName { get; set; }
         public string HttpTrigger { get; set; }
         public IList<string> AllowedHosts { get; }
+        public string Version { get; set; }
         public IList<StringSegment> AllowedRedirects
         {
             get

+ 2 - 0
TEAMModelOS/Controllers/System/CoreController.cs

@@ -683,6 +683,8 @@ namespace TEAMModelOS.Controllers
             //var v2 = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
             // var description = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyDescriptionAttribute>().Description;
             var version = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
+            long.TryParse(version.PadRight(12, '0').Replace(".", ""),out long aver);
+            long.TryParse(_option.Version.PadRight(12, '0').Replace(".", ""),out long bver );
             long nowtime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
             //Console.WriteLine($"Assembly.GetEntryAssembly().GetName().Version: " +
 

+ 2 - 1
TEAMModelOS/appsettings.json

@@ -17,7 +17,8 @@
     "JwtSecretKey": "fXO6ko/qyXeYrkecPeKdgXnuLXf9vMEtnBC9OB3s+aA=",
     "Exp": 86400,
     "IdTokenSalt": "8263692E2213497BB55E74792B7900B4",
-    "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/"
+    "HttpTrigger": "https://teammodelosfunction.chinacloudsites.cn/api/",
+    "Version": "5.2303.1.1"
   },
   "Azure": {
     "Storage": {