버전파일 참조 못하는 버그 수정

웹훅 1회만 동작하는 버그 수정
This commit is contained in:
김판돌 2023-11-26 21:32:07 +09:00
parent b4064c3bf9
commit 7b6567ea1c
7 changed files with 19 additions and 4 deletions

View File

@ -99,10 +99,10 @@ namespace Server.Git
//초기세팅일 경우 데이터를 받아오고 아닐경우 데이터를저장
if(ProtocolProcessor.version == "")
{
string versionFilePath = Path.Combine(repositoryPath, @"/version.txt");
string versionFilePath = Path.Combine(repositoryPath + @"/version");
if (File.Exists(versionFilePath))
{
using (StreamReader reader = new StreamReader(repositoryPath + @"/version.txt"))
using (StreamReader reader = new StreamReader(repositoryPath + @"/version"))
{
ProtocolProcessor.version = reader.ReadToEnd();
}
@ -116,7 +116,7 @@ namespace Server.Git
}
else
{
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/version.txt"))
using (StreamWriter writer = new StreamWriter(repositoryPath + @"/version"))
{
writer.Write(ProtocolProcessor.version);
logger.Info("saveVersion");

View File

@ -70,6 +70,9 @@ namespace Server.Git
case "int":
newTableQuery += $"{sheets[n].variable[m]} INT ";
break;
case "float":
newTableQuery += $"{sheets[n].variable[m]} FLOAT4 ";
break;
case "string":
newTableQuery += $"{sheets[n].variable[m]} VARCHAR(255) ";
break;
@ -77,6 +80,7 @@ namespace Server.Git
newTableQuery += $"{sheets[n].variable[m]} INT2 ";
break;
case "text":
case "json":
newTableQuery += $"{sheets[n].variable[m]} TEXT ";
break;
case "time":
@ -121,6 +125,7 @@ namespace Server.Git
break;
case "string":
case "text":
case "json":
query += $"'{pair.Value[sheets[n].variable[m]]}'";
break;
case "time":

View File

@ -7,6 +7,8 @@ namespace Server.System
{
private static readonly NLog.ILogger logger = LogManager.GetCurrentClassLogger();
public static bool isUpdate = false;
public static Thread thread;
private static AbstractGit git;
@ -14,7 +16,12 @@ namespace Server.System
public static string Process(HttpContext context)
{
//TODO 아무때나 호출되지 않게 만들기
isUpdate = !isUpdate;
if (isUpdate)
{
return successResp.ToJson();
}
string Response;
try
{

Binary file not shown.

View File

@ -139,3 +139,6 @@
2.0
2.0
2.0
2.0
2.0
2.0