File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ To use this plugin you need to include the following block in your
41
41
| auth_username | git | The name of the user to use for authentication. |
42
42
| auth_password | | The password to use for basic auth or the SSH key. |
43
43
| auth_private_key | | The path to an SSH private key file. |
44
- | git_path | . | The path to the Git repository |
44
+ | git_path | . | The path to the Git repository. |
45
+ | push_options | | The push options for the git tag push. |
45
46
46
47
### Authentication
47
48
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ type Repository struct {
28
28
remoteName string
29
29
auth transport.AuthMethod
30
30
repo * git.Repository
31
+ pushOptions map [string ]string
31
32
}
32
33
33
34
func (repo * Repository ) Init (config map [string ]string ) error {
@@ -68,6 +69,15 @@ func (repo *Repository) Init(config map[string]string) error {
68
69
repo .auth = nil
69
70
}
70
71
72
+ if config ["push_options" ] != "" {
73
+ options := strings .Split (config ["push_options" ], "," )
74
+ repo .pushOptions = make (map [string ]string , len (options ))
75
+ for _ , o := range options {
76
+ key , value , _ := strings .Cut (o , "=" )
77
+ repo .pushOptions [key ] = value
78
+ }
79
+ }
80
+
71
81
gitPath := config ["git_path" ]
72
82
if gitPath == "" {
73
83
gitPath = "."
@@ -201,7 +211,8 @@ func (repo *Repository) CreateRelease(release *provider.CreateReleaseConfig) err
201
211
RefSpecs : []config.RefSpec {
202
212
config .RefSpec (fmt .Sprintf ("refs/tags/%s:refs/tags/%s" , tag , tag )),
203
213
},
204
- Auth : repo .auth ,
214
+ Auth : repo .auth ,
215
+ Options : repo .pushOptions ,
205
216
})
206
217
return err
207
218
}
You can’t perform that action at this time.
0 commit comments