mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
fix error
This commit is contained in:
parent
987f9a49d3
commit
8d37efef68
2 changed files with 15 additions and 3 deletions
16
vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go
generated
vendored
16
vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go
generated
vendored
|
@ -158,14 +158,26 @@ func (m *Metadata) EnvironDrone() map[string]string {
|
|||
// * DRONE_REPO_TRUSTED
|
||||
// * DRONE_YAML_VERIFIED
|
||||
// * DRONE_YAML_VERIFIED
|
||||
var (
|
||||
owner string
|
||||
name string
|
||||
|
||||
parts = strings.Split(m.Repo.Name, "/")
|
||||
)
|
||||
if len(parts) == 2 {
|
||||
owner = strings.Split(m.Repo.Name, "/")[0]
|
||||
name = strings.Split(m.Repo.Name, "/")[1]
|
||||
} else {
|
||||
name = m.Repo.Name
|
||||
}
|
||||
params := map[string]string{
|
||||
"CI": "drone",
|
||||
"DRONE": "true",
|
||||
"DRONE_ARCH": "linux/amd64",
|
||||
"DRONE_REPO": m.Repo.Name,
|
||||
"DRONE_REPO_SCM": "git",
|
||||
"DRONE_REPO_OWNER": strings.Split(m.Repo.Name, "/")[0],
|
||||
"DRONE_REPO_NAME": strings.Split(m.Repo.Name, "/")[1],
|
||||
"DRONE_REPO_OWNER": owner,
|
||||
"DRONE_REPO_NAME": name,
|
||||
"DRONE_REPO_LINK": m.Repo.Link,
|
||||
"DRONE_REPO_BRANCH": m.Curr.Commit.Branch,
|
||||
"DRONE_REPO_PRIVATE": fmt.Sprintf("%v", m.Repo.Private),
|
||||
|
|
2
vendor/vendor.json
vendored
2
vendor/vendor.json
vendored
|
@ -44,7 +44,7 @@
|
|||
"revisionTime": "2017-04-21T13:35:39Z"
|
||||
},
|
||||
{
|
||||
"checksumSHA1": "ceGSLXEBIMOhRkrsO5f8umDkmCg=",
|
||||
"checksumSHA1": "NBMyXSWTkSz8fofoDD3WGIKICEw=",
|
||||
"path": "github.com/cncd/pipeline/pipeline/frontend",
|
||||
"revision": "f56fb78bd5d412023bad5a37933b3a2506f1e468",
|
||||
"revisionTime": "2017-04-21T13:35:39Z"
|
||||
|
|
Loading…
Reference in a new issue