Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 906 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
494 liveuser 1
#!/bin/php
2
<?php
3
 
4
/*
5
	QBPWCF, Quick Build PHP website Component base on Fedora Linux.
619 liveuser 6
    Copyright (C) 2015~2024 Min-Jhin,Chen
494 liveuser 7
 
8
    This file is part of QBPWCF.
9
 
10
    QBPWCF is free software: you can redistribute it and/or modify
11
    it under the terms of the GNU General Public License as published by
12
    the Free Software Foundation, either version 3 of the License, or
13
    (at your option) any later version.
14
 
15
    QBPWCF is distributed in the hope that it will be useful,
16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
    GNU General Public License for more details.
19
 
20
    You should have received a copy of the GNU General Public License
21
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.
22
 
23
*/
24
 
25
/*
26
說明:
27
將指定的svn目錄輸出、打包、壓縮、上傳到目標Server,然後解壓縮、安裝、移除伺服端跟local端安裝檔案.
28
 
29
範例:
30
 
31
依照 myConfig.php 設定檔的內容執行
32
packetFromSvnToRemoteServer.php myConfig.php
33
 
34
建立新的設定檔案 myConfig.php
35
packetFromSvnToRemoteServer.php --create-conf myConfig.php
36
 
37
*/
38
 
39
#使用命名空間qbpwcf
40
namespace qbpwcf;
41
 
42
#以該檔案的實際位置的 lib path 為 include path 首位
921 liveuser 43
exec("cd ".pathinfo(__FILE__)["dirname"]."/../lib/qbpwcf;pwd;",$output,$status);
494 liveuser 44
set_include_path($output[0].PATH_SEPARATOR.get_include_path());
45
 
46
#匯入外部套件
47
include("allInOne.php");
48
 
509 liveuser 49
#函式說明:
50
#export svn 上的檔案目錄,進行打包放到遠端伺服器上並進行安裝或更新的動作.
51
#回傳結果:
52
#無.
53
#必填參數:
54
#無.
55
#可省略參數:
56
#無.
57
#參考資料:
58
#無.
59
#備註:
60
#用戶端上需要有安裝php,openssh-clients,subversion(svn),openssh-askpass,zstd套件.
61
#網站伺服器端需要有安裝openssh-server,zstd套件.
62
#待測試
63
#建議將svn預先輸入密碼的功能分離出來
64
cmd::packetFromSvnToRemoteServer();
494 liveuser 65
 
66
?>