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:
parent
2c9e796c96
commit
7e97f3a391
7
main.go
7
main.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user