修改集成部分执行脚本,修改cid回调部分main拦截
This commit is contained in:
parent
55eaea79be
commit
dc72a8e3a6
|
|
@ -61,7 +61,7 @@ func RunCID(c *gin.Context) {
|
||||||
name = names[0]
|
name = names[0]
|
||||||
|
|
||||||
//脚本内容
|
//脚本内容
|
||||||
scriptContent := `TARGET_DIR = ` + proto.CID_BASE_DIR + `workspace/` + name + `
|
scriptContent := `TARGET_DIR=` + proto.CID_BASE_DIR + `workspace/` + name + `
|
||||||
if [ ! -d $TARGET_DIR ]; then
|
if [ ! -d $TARGET_DIR ]; then
|
||||||
git clone ` + cid.Url + `
|
git clone ` + cid.Url + `
|
||||||
cd $TARGET_DIR
|
cd $TARGET_DIR
|
||||||
|
|
@ -192,7 +192,7 @@ func CIDCallback(c *gin.Context) {
|
||||||
name := strs[len(strs)-1]
|
name := strs[len(strs)-1]
|
||||||
names := strings.Split(name, ".")
|
names := strings.Split(name, ".")
|
||||||
name = names[0]
|
name = names[0]
|
||||||
scriptContent := `TARGET_DIR = ` + proto.CID_BASE_DIR + `workspace/` + name + `
|
scriptContent := `TARGET_DIR=` + proto.CID_BASE_DIR + `workspace/` + name + `
|
||||||
if [ ! -d $TARGET_DIR ]; then
|
if [ ! -d $TARGET_DIR ]; then
|
||||||
git clone ` + res.Url + `
|
git clone ` + res.Url + `
|
||||||
cd $TARGET_DIR
|
cd $TARGET_DIR
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -69,7 +69,7 @@ func JWTAuthMiddleware() gin.HandlerFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果请求为login或register,则不需要验证token
|
//如果请求为login或register,则不需要验证token
|
||||||
if strings.Contains(c.Request.URL.Path, "/login") || strings.Contains(c.Request.URL.Path, "/register") || strings.Contains(c.Request.URL.Path, "/uuid") || strings.Contains(c.Request.URL.Path, "/gqr") {
|
if strings.Contains(c.Request.URL.Path, "/login") || strings.Contains(c.Request.URL.Path, "/register") || strings.Contains(c.Request.URL.Path, "/uuid") || strings.Contains(c.Request.URL.Path, "/gqr") || strings.Contains(c.Request.URL.Path, "/cid/callback") {
|
||||||
c.Next()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue