Commit 52a6dbf0 by sikang

cd ..

parent d52ffc66
......@@ -12,6 +12,7 @@ out/
*.pyc
__pycache__/
__init__.py
######################
# Gradle & Gradle Wrapper
......
# -*-coding:utf-8-*-
import requests
import io
import json
import string
import time
class Api:
host = "http://149.129.219.36:9898"
#查询发布记录
def select_log_info(self,config):
url = self.host+"/gp/package/info"
params = {'corpId': config['corpId']}
result = requests.get(url, params)
return result
#新 插入发布记录
def insert_log_v2(self,config):
url = self.host+"/gp/package/insert_info"
params = {'corpId': config['corpId'],'pkgName':config['pkgName'],'level':config['level'],\
'developer':config['developer'],'action':config['action'],'accountSource':config['accountSource'],'pkgType':config['pkgType']}
result = requests.get(url, params)
return result
#旧 插入发布记录
def insert_log_v1(self,config):
url = "http://34.92.238.50:5021/refreshGPInfo"
seconds = int(time.time())
params = {'corpid': config['corpId'], 'level': config['level'], 'developer': config['developer'], 'pkg_name': config['pkgName'], 'action': config['action'], 'update_time': seconds}
result = requests.get(url, params)
return result
#更新记录
def update_log(self,config):
url = self.host+"/gp/package/insert_info"
params = {'corpId': config['corpId'],'pkgName':config['pkgName'],'level':config['level'],\
'developer':config['developer'],'action':config['action'],'accountSource':config['accountSource'],'pkgType':config['pkgType']}
result = requests.get(url, params)
return result
\ No newline at end of file
{
"corpId": "99999",
"pkgName": "com.test.tset",
"level": "level",
"developer": "test",
"action": "action",
"offlineReason": "offlineReason",
"accountSource": "accountSource",
"submitTimeFrom": "submitTimeFrom",
"submitTimeTo": "submitTimeTo",
"onlineTimeFrom": "onlineTimeFrom",
"onlineTimeTo": "onlineTimeTo",
"offlineTimeFrom": "offlineTimeFrom",
"offlineTimeTo": "offlineTimeTo",
"status": "status",
"pkgType": "pkgType"
}
\ No newline at end of file
. gradle.properties
#客户编号
cropid=${corp_id}
#客户等级
level=${level}
#开发者
developer="test"
#包名(默认读取gragle.properties)
pkg_name=${app_id}
echo "1、提交一次上架记录"
echo "2、修改最新记录"
echo "3、记录下架原因"
echo " "
echo -n "请输入指令编号:"
read commod
echo -n "此次上架方案:"
read action
chmod a+x gponline.py
if (($commod == '1'))
then
git add .
git commit -m "${pkg_name}"
git push origin ${code_branch}
tagName=t${cropid}-${pkg_name}
git tag -d ${tagName}
git push origin --delete tag ${tagName}
git tag -a ${tagName} -m ${tagName}
git push origin ${tagName}
python gponline.py "${cropid}" "${level}" "${developer}" "${pkg_name}" "${action}"
elif (($commod == '2'))
then
chmod a+x gponline.py
python gponline.py "${cropid}" "${level}" "${developer}" "${pkg_name}" "${action}"
elif (($commod == '3'))
then
echo -n "输入要指定的包名:"
read pkg
chmod a+x gponline.py
python gponline.py "${cropid}" "${level}" "${developer}" "${pkg}" "${action}"
else
echo "找不到编号"
fi
# -*-coding:utf-8-*-
from api import Api
import requests
import time
import datetime
import sys
import io
import json
def loadConfig():
with io.open('config.json', "r+") as fin:
return json.load(fin)
def insert_log():
# result = api.insert_log_v1(config)
# print("v1接口result: "+result.json())
result = api.insert_log_v2(config)
print(result.json())
if __name__ == "__main__":
api = Api()
config=loadConfig()
insert_log()
# result = api.select_log_info(config)
# print(result.json())
\ No newline at end of file
import requests
import time
import datetime
import sys
seconds = int(time.time())
paramMap = {'corpid': sys.argv[1], 'level': sys.argv[2], 'developer': sys.argv[3], 'pkg_name': sys.argv[4], 'action': sys.argv[5], 'update_time': seconds}
result = requests.get("http://34.92.238.50:5021/refreshGPInfo", params=paramMap)
print(result.json())
. ../../gradle.properties
developer="sikang"
cus_crop_id=$1
if((${#cus_crop_id}==0))
then
cus_crop_id="${corp_id_majia}"
fi
if((${#cus_crop_id}==0))
then
cus_crop_id="${corp_id}"
fi
echo "1、commit + push + push_tag + 自动发包登记 (需要配置分支)"
echo "2、自动记录发包(读取包名)"
echo "3、手动记录发包(手动指定包名)"
echo " "
echo -n "请输入指令编号:"
read commod
echo -n "此次上架方案:"
read action
chmod a+x gponline.py
if (($commod == '1'))
then
cd ../../
git add .
git commit -m "${app_id} ${version_name}"
git push origin ${git_branch}
tagName=t${corp_id}-${app_id}
git tag -d ${tagName}
git push origin --delete tag ${tagName}
git tag -a ${tagName} -m ${tagName}
git push origin ${tagName}
cd lib_base/script
python gponline.py "${cus_crop_id}" "${level}" "${developer}" "${app_id}" "${action}"
elif (($commod == '2'))
then
python gponline.py "${cus_crop_id}" "${level}" "${developer}" "${app_id}" "${action}"
elif (($commod == '3'))
then
echo -n "输入要指定的包名:"
read pkgname
python gponline.py "${cus_crop_id}" "${level}" "${developer}" "${pkgname}" "${action}"
else
echo "找不到编号"
fi
......@@ -181,9 +181,9 @@ then
chmod a+x refresh_gponline.sh
if((${#1} > 0))
then
./refresh_gponline.sh "${corp_id}${1}"
gp_release/gp_release.sh "${corp_id}${1}"
else
./refresh_gponline.sh
gp_release/gp_release.sh
fi
elif (($commod == '21'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment