diff --git a/CalculatorCInterface.dll b/CalculatorCInterface.dll index baa9af2..d817d63 100644 Binary files a/CalculatorCInterface.dll and b/CalculatorCInterface.dll differ diff --git a/deploy/CalculatorCInterface.dll b/deploy/CalculatorCInterface.dll index baa9af2..d817d63 100644 Binary files a/deploy/CalculatorCInterface.dll and b/deploy/CalculatorCInterface.dll differ diff --git a/deploy/helloworld.exe b/deploy/helloworld.exe index 5114fc5..14ccaac 100644 Binary files a/deploy/helloworld.exe and b/deploy/helloworld.exe differ diff --git a/helloworld.exe b/helloworld.exe index 5114fc5..14ccaac 100644 Binary files a/helloworld.exe and b/helloworld.exe differ diff --git a/helloworld.lpr b/helloworld.lpr index 6129a0e..ea64001 100644 --- a/helloworld.lpr +++ b/helloworld.lpr @@ -15,6 +15,8 @@ var LocalBranchName: array[0..32] of char; FileToCommit: array[0..128] of char; CommitMessage: array[0..256] of char; + UserName: array[0..64] of char; + PassWord: array[0..64] of char; begin // TariffCalc := NewTariffCalculator; @@ -25,6 +27,8 @@ begin LocalBranchName := 'zg1/zone1'; FileToCommit := 'etc/psa_tariff/tariff01.json'; CommitMessage := 'TEST TEST'; + UserName := 'GerhardHoffmann'; + PassWord := 'ghlinux12345'; if not DirectoryExistsUTF8(ExpandFilenameUtf8(LocalCustomerRepo)) then CreateDirUTF8(ExpandFilenameUtf8(LocalCustomerRepo)); @@ -36,7 +40,9 @@ begin if not CheckoutLocalBranch(LocalCustomerRepo, LocalBranchName) = 0 then writeLn('cannot check out') ; if not CommitFile(LocalCustomerRepo, LocalBranchName, FileToCommit, CommitMessage) = 0 then - writeLn('cannot check out') ; + writeLn('cannot commit') ; + if not PushLocalRepository(LocalCustomerRepo, LocalBranchName, UserName, PassWord) = 0 then + writeLn('cannot push') ; Finally if ShutdownGitLibrary() >= 0 then writeLn('shutdown git library') ; diff --git a/tariffcalculator.pas b/tariffcalculator.pas index 9e1658a..ae7a491 100644 --- a/tariffcalculator.pas +++ b/tariffcalculator.pas @@ -21,7 +21,8 @@ function CloneRepository(var url; var local_path) : cint32; stdcall; function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall; function CommitFile(var local_path; var branch_name; var file_name; var comment) : cint32; stdcall; - +function PushLocalRepository(var local_path; var branch_name; + var user_name; var password) : cint32; stdcall; implementation const @@ -36,6 +37,8 @@ function CloneRepository(var url; var local_path) : cint32; stdcall; external DL function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall; external DLLName; function CommitFile(var local_path; var branch_name; var file_name; var comment) : cint32; stdcall; external DLLName; +function PushLocalRepository(var local_path; var branch_name; + var user_name; var password) : cint32; stdcall; external DLLName; end.