|
|
@@ -107,9 +107,9 @@ func Build(c *gin.Context) { |
|
|
|
NewBit: strings.Join(req.Bit, ","), |
|
|
|
} |
|
|
|
//TODO 调用打包机 |
|
|
|
keys := "CloudBuild" |
|
|
|
keys := "ddxq-android" |
|
|
|
if req.Os == "2" { |
|
|
|
keys = "CloudBuild-iOS" |
|
|
|
keys = "%E8%9B%8B%E8%9B%8B%E6%98%9F%E7%90%83-iOS" |
|
|
|
} |
|
|
|
token := "aaaaaa" |
|
|
|
masterKey := "master" |
|
|
@@ -118,26 +118,25 @@ func Build(c *gin.Context) { |
|
|
|
masterKey = "dev" |
|
|
|
domain = "http://ddstar.izhim.cn" |
|
|
|
} |
|
|
|
url := "http://120.76.175.204:8080/job/" + keys + "/buildWithParameters?platform=" + tmp.NewPlatform + "&os=" + req.Os + "×tamp=" + utils.Int64ToStr(time.Now().Unix()) + "&token=" + token + "&branch=" + masterKey + "&domain=" + php2go.URLEncode(domain) |
|
|
|
url := "http://120.76.175.204:8080/job/" + keys + "/buildWithParameters?version=" + req.Version + "×tamp=" + utils.Int64ToStr(time.Now().Unix()) + "&token=" + token + "&branch=" + masterKey + "&domain=" + php2go.URLEncode(domain) |
|
|
|
tmp.Bit = strings.Join(req.Bit, ",") |
|
|
|
if req.Os == "2" { |
|
|
|
db.Db.Insert(&tmp) |
|
|
|
url += "&id=" + utils.IntToStr(tmp.Id) |
|
|
|
url += "&ios_id=" + utils.IntToStr(tmp.Id) |
|
|
|
getcurl(url) |
|
|
|
} else { |
|
|
|
if req.IsCombine != "1" { |
|
|
|
for _, v := range req.Bit { |
|
|
|
newUrl := url |
|
|
|
ids := make([]string, 0) |
|
|
|
for _, v1 := range req.Platform { |
|
|
|
tmp1 := tmp |
|
|
|
tmp1.Bit = v |
|
|
|
tmp1.Platform = v1 |
|
|
|
db.Db.Insert(&tmp1) |
|
|
|
ids = append(ids, utils.IntToStr(tmp1.Id)) |
|
|
|
newUrl := url |
|
|
|
newUrl += "&bit=" + v + "&android_id=" + utils.IntToStr(tmp1.Id) |
|
|
|
getcurl(newUrl) |
|
|
|
} |
|
|
|
newUrl += "&bit=" + v + "&id=" + strings.Join(ids, ",") |
|
|
|
getcurl(newUrl) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|