该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forums 的 baozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull
在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003
int _readcputemp(char* _path) | |
{ | |
int temp = 0; | |
FILE* fd; | |
char buff[256]; | |
char _temp_file[255] = { 0 }; | |
sprintf(_temp_file, "%stemp", _path); | |
fd = fopen(_temp_file, "r"); | |
if (fd != NULL) |
#!/bin/bash | |
# Usage: merge-to-subdir source-repo destination-repo subdir | |
# | |
# Merges the history of source-repo into destination-repo as the | |
# history of the subdirectory subdir. | |
# | |
# source-repo can be local or remote. | |
# destination-repo must be local to the machine. | |
# subdir can be a relative path, in which case intermediate |
public static Stream Open(this ZipArchiveEntry entry, bool checkOpenable) | |
{ | |
try | |
{ | |
return entry.GetType().GetMethod("OpenInReadMode", BindingFlags.NonPublic | BindingFlags.Instance) | |
.Invoke(entry, new object[] { checkOpenable }) as Stream; | |
} | |
catch (TargetInvocationException ex1) | |
{ |
/***************************************************************************** | |
* 版权所有(C) 2006, ZTE Corp. WiMAX | |
*---------------------------------------------------------------------------- | |
* 模 块 名 : BSPCommon | |
* 文件名称 : str2time.c | |
* 文件标识 : {[N/A]} | |
* 内容摘要 : 将字符串转换为时间 | |
* 注意事项 : | |
* 作 者 : 田瑞忠 | |
* 创建日期 : 2008-12-27 |
LPCWSTR STR2LPCWSTR( char * str) | |
{ | |
CString str_____ = CString(str); | |
USES_CONVERSION; | |
LPCWSTR lpcw_param = A2CW(W2A(str_____)); | |
str_____.ReleaseBuffer(); | |
return lpcw_param; | |
} |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
该功能通过监听 git push 事件,触发A服务器指定目录 git pull。
比如 forums 的 baozi 分支在任意环境下成功push后,会在A服务器的 /data/web/framework/trunk/ baozi/ forums 目录执行 git pull
在A服务器运行 auto_update.py。
在 gitlab,添加 web hook: http://A服务器IP:8003