mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 21:21:03 +00:00
feat: add updater for package.json
This commit is contained in:
parent
942aa80aa9
commit
ecbd148e7a
14 changed files with 174 additions and 44 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"log/slog"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/go-git/go-git/v5"
|
||||
|
|
@ -144,7 +145,7 @@ func (r *Repository) UpdateFile(_ context.Context, path string, create bool, upd
|
|||
updatedContent := string(content)
|
||||
|
||||
for _, update := range updaters {
|
||||
updatedContent, err = update(updatedContent)
|
||||
updatedContent, err = update(updatedContent, filepath.Base(path))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to run updater on file %s", path)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue