mirror of
https://codeberg.org/woodpecker-plugins/go-plugin
synced 2026-06-16 14:49:10 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b54bb824c | |||
| 04d11d71e2 | |||
| 6c31fd4eca | |||
| 6d2dd250f2 | |||
| b9901cb0a4 | |||
| 35e4580f92 | |||
| 7c2ff72c02 | |||
| 8cc8f11ed6 | |||
| c437b69716 | |||
| ff7388263c |
@@ -6,7 +6,7 @@ when:
|
||||
|
||||
steps:
|
||||
- name: release-helper
|
||||
image: docker.io/woodpeckerci/plugin-ready-release-go:4.1.0
|
||||
image: docker.io/woodpeckerci/plugin-ready-release-go:4.1.1
|
||||
settings:
|
||||
release_branch: ${CI_COMMIT_BRANCH}
|
||||
git_email: woodpecker-bot@obermui.de
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# Changelog
|
||||
|
||||
## [1.2.0](https://codeberg.org/woodpecker-plugins/go-plugin/releases/tag/v1.2.0) - 2026-05-30
|
||||
|
||||
### ❤️ Thanks to all contributors! ❤️
|
||||
|
||||
@6543, @woodpecker-bot
|
||||
|
||||
### ✨ Features
|
||||
|
||||
- Support CI_STEP_NAME and CI_STEP_TYPE [[#88](https://codeberg.org/woodpecker-plugins/go-plugin/pulls/88)]
|
||||
|
||||
### 📦️ Dependency
|
||||
|
||||
- fix(deps): update module golang.org/x/net to v0.55.0 [[#86](https://codeberg.org/woodpecker-plugins/go-plugin/pulls/86)]
|
||||
- fix(deps): update module golang.org/x/net to v0.54.0 [[#84](https://codeberg.org/woodpecker-plugins/go-plugin/pulls/84)]
|
||||
|
||||
## [1.1.0](https://codeberg.org/woodpecker-plugins/go-plugin/releases/tag/v1.1.0) - 2026-03-30
|
||||
|
||||
### ❤️ Thanks to all contributors! ❤️
|
||||
|
||||
@@ -2,14 +2,14 @@ module codeberg.org/woodpecker-plugins/go-plugin
|
||||
|
||||
go 1.25.0
|
||||
|
||||
toolchain go1.26.1
|
||||
toolchain go1.26.3
|
||||
|
||||
require (
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/rs/zerolog v1.35.0
|
||||
github.com/rs/zerolog v1.35.1
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/urfave/cli/v3 v3.8.0
|
||||
golang.org/x/net v0.52.0
|
||||
github.com/urfave/cli/v3 v3.9.0
|
||||
golang.org/x/net v0.55.0
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -17,6 +17,6 @@ require (
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
golang.org/x/sys v0.42.0 // indirect
|
||||
golang.org/x/sys v0.45.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
||||
@@ -8,17 +8,17 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
|
||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/rs/zerolog v1.35.0 h1:VD0ykx7HMiMJytqINBsKcbLS+BJ4WYjz+05us+LRTdI=
|
||||
github.com/rs/zerolog v1.35.0/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=
|
||||
github.com/rs/zerolog v1.35.1 h1:m7xQeoiLIiV0BCEY4Hs+j2NG4Gp2o2KPKmhnnLiazKI=
|
||||
github.com/rs/zerolog v1.35.1/go.mod h1:EjML9kdfa/RMA7h/6z6pYmq1ykOuA8/mjWaEvGI+jcw=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/urfave/cli/v3 v3.8.0 h1:XqKPrm0q4P0q5JpoclYoCAv0/MIvH/jZ2umzuf8pNTI=
|
||||
github.com/urfave/cli/v3 v3.8.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
|
||||
golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0=
|
||||
golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw=
|
||||
github.com/urfave/cli/v3 v3.9.0 h1:AV9lIiPv3ukYnxunaCUsHnEozptYmDN2F0+yWqLMn/c=
|
||||
github.com/urfave/cli/v3 v3.9.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
|
||||
golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8=
|
||||
golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo=
|
||||
golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY=
|
||||
golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
@@ -22,13 +22,40 @@ import (
|
||||
|
||||
// Step defines runtime metadata for a step.
|
||||
type Step struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Type StepType `json:"type,omitempty"`
|
||||
Number int `json:"number,omitempty"`
|
||||
Started time.Time `json:"started,omitempty"`
|
||||
Finished time.Time `json:"finished,omitempty"`
|
||||
}
|
||||
|
||||
// StepType identifies the type of step.
|
||||
type StepType string
|
||||
|
||||
const (
|
||||
StepTypeClone StepType = "clone"
|
||||
StepTypeService StepType = "service"
|
||||
StepTypePlugin StepType = "plugin"
|
||||
StepTypeCommands StepType = "commands"
|
||||
StepTypeCache StepType = "cache"
|
||||
)
|
||||
|
||||
func stepFlags() []cli.Flag {
|
||||
return []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "step.name",
|
||||
Usage: "step name",
|
||||
Sources: cli.EnvVars(
|
||||
"CI_STEP_NAME",
|
||||
),
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "step.type",
|
||||
Usage: "step type",
|
||||
Sources: cli.EnvVars(
|
||||
"CI_STEP_TYPE",
|
||||
),
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "step.number",
|
||||
Usage: "step number",
|
||||
@@ -56,6 +83,8 @@ func stepFlags() []cli.Flag {
|
||||
|
||||
func stepFromContext(c *cli.Command) Step {
|
||||
return Step{
|
||||
Name: c.String("step.name"),
|
||||
Type: StepType(c.String("step.type")),
|
||||
Number: c.Int("step.number"),
|
||||
Started: time.Unix(c.Int64("step.started"), 0),
|
||||
Finished: time.Unix(c.Int64("step.finished"), 0),
|
||||
|
||||
Reference in New Issue
Block a user