You've already forked go-semantic-release
Integrations are simple helpers to make integration with existing tools easier.
At basic npm support, the integration will set the version before release to the `package.json`
```yml
integrations:
npm:
enabled: true
```
27 lines
521 B
Go
27 lines
521 B
Go
package integrations
|
|
|
|
import (
|
|
"github.com/Nightapes/go-semantic-release/internal/shared"
|
|
"github.com/Nightapes/go-semantic-release/pkg/config"
|
|
)
|
|
|
|
// Integrations struct
|
|
type Integrations struct {
|
|
version *shared.ReleaseVersion
|
|
config *config.Integrations
|
|
}
|
|
|
|
func New(config *config.Integrations, version *shared.ReleaseVersion) *Integrations {
|
|
return &Integrations{
|
|
config: config,
|
|
version: version,
|
|
}
|
|
}
|
|
|
|
func (i Integrations) Run() error {
|
|
if i.config.NPM.Enabled {
|
|
return i.updateNPM()
|
|
}
|
|
return nil
|
|
}
|