0
0
mirror of https://github.com/thegeeklab/wp-gitea-release.git synced 2024-11-09 17:30:39 +00:00

change pwd to project workspace

This commit is contained in:
Brad Rydzewski 2015-12-07 00:01:55 -08:00
parent 2c9e796c96
commit 7e97f3a391

View File

@ -23,6 +23,7 @@ type Params struct {
}
func main() {
workspace := drone.Workspace{}
repo := drone.Repo{}
build := drone.Build{}
vargs := Params{}
@ -30,7 +31,7 @@ func main() {
plugin.Param("repo", &repo)
plugin.Param("build", &build)
plugin.Param("vargs", &vargs)
plugin.Param("workspace", &workspace)
plugin.MustParse()
if build.Event != "tag" {
@ -40,6 +41,10 @@ func main() {
return
}
if len(workspace.Path) != 0 {
os.Chdir(workspace.Path)
}
if len(vargs.BaseUrl) == 0 {
vargs.BaseUrl = "https://api.github.com/"
} else {