add PushLocalRepository()
This commit is contained in:
parent
9d590039aa
commit
f56e10a24e
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
helloworld.exe
BIN
helloworld.exe
Binary file not shown.
@ -15,6 +15,8 @@ var
|
|||||||
LocalBranchName: array[0..32] of char;
|
LocalBranchName: array[0..32] of char;
|
||||||
FileToCommit: array[0..128] of char;
|
FileToCommit: array[0..128] of char;
|
||||||
CommitMessage: array[0..256] of char;
|
CommitMessage: array[0..256] of char;
|
||||||
|
UserName: array[0..64] of char;
|
||||||
|
PassWord: array[0..64] of char;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// TariffCalc := NewTariffCalculator;
|
// TariffCalc := NewTariffCalculator;
|
||||||
@ -25,6 +27,8 @@ begin
|
|||||||
LocalBranchName := 'zg1/zone1';
|
LocalBranchName := 'zg1/zone1';
|
||||||
FileToCommit := 'etc/psa_tariff/tariff01.json';
|
FileToCommit := 'etc/psa_tariff/tariff01.json';
|
||||||
CommitMessage := 'TEST TEST';
|
CommitMessage := 'TEST TEST';
|
||||||
|
UserName := 'GerhardHoffmann';
|
||||||
|
PassWord := 'ghlinux12345';
|
||||||
if not DirectoryExistsUTF8(ExpandFilenameUtf8(LocalCustomerRepo)) then
|
if not DirectoryExistsUTF8(ExpandFilenameUtf8(LocalCustomerRepo)) then
|
||||||
CreateDirUTF8(ExpandFilenameUtf8(LocalCustomerRepo));
|
CreateDirUTF8(ExpandFilenameUtf8(LocalCustomerRepo));
|
||||||
|
|
||||||
@ -36,7 +40,9 @@ begin
|
|||||||
if not CheckoutLocalBranch(LocalCustomerRepo, LocalBranchName) = 0 then
|
if not CheckoutLocalBranch(LocalCustomerRepo, LocalBranchName) = 0 then
|
||||||
writeLn('cannot check out') ;
|
writeLn('cannot check out') ;
|
||||||
if not CommitFile(LocalCustomerRepo, LocalBranchName, FileToCommit, CommitMessage) = 0 then
|
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
|
Finally
|
||||||
if ShutdownGitLibrary() >= 0 then
|
if ShutdownGitLibrary() >= 0 then
|
||||||
writeLn('shutdown git library') ;
|
writeLn('shutdown git library') ;
|
||||||
|
@ -21,7 +21,8 @@ function CloneRepository(var url; var local_path) : cint32; stdcall;
|
|||||||
function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall;
|
function CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall;
|
||||||
function CommitFile(var local_path; var branch_name;
|
function CommitFile(var local_path; var branch_name;
|
||||||
var file_name; var comment) : cint32; stdcall;
|
var file_name; var comment) : cint32; stdcall;
|
||||||
|
function PushLocalRepository(var local_path; var branch_name;
|
||||||
|
var user_name; var password) : cint32; stdcall;
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
const
|
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 CheckoutLocalBranch(var local_path; var branch_name) : cint32; stdcall; external DLLName;
|
||||||
function CommitFile(var local_path; var branch_name;
|
function CommitFile(var local_path; var branch_name;
|
||||||
var file_name; var comment) : cint32; stdcall; external DLLName;
|
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.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user