Skip to content

Commit

Permalink
fix(#62): show message block with right indent
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightapes authored and fwiedmann committed Mar 4, 2022
1 parent ec8dc17 commit c5f993e
Show file tree
Hide file tree
Showing 15 changed files with 470 additions and 166 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
uses: actions/checkout@v1

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.29
version: latest

- name: Run tests
run: go test ./...
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ lint:
golangci-lint run --print-issued-lines=false --fix ./...

test:
go test --coverprofile coverage.out -v -race -parallel 20 ./...
go test --coverprofile coverage.out -v -parallel 20 ./...
8 changes: 7 additions & 1 deletion cmd/go-semantic-release/commands/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func init() {
changelogCmd.Flags().Bool("checks", false, "Check for missing values and envs")
changelogCmd.Flags().Bool("overwrite", false, "Overwrite the content of the changelog. Default is to prepend the new changelog to the existing file.")
changelogCmd.Flags().StringP("out", "o", "CHANGELOG.md", "Name of the file")
changelogCmd.Flags().String("from", "", "Generate combined changelog from given version until latest version ")
changelogCmd.Flags().Int64("max-file-size", 10, "The max allowed file size in MB for a changelog file. If the file size is larger, the current file will be moved to a new file named <filename>-01.md. The next changelog will be written to de default file.")
rootCmd.AddCommand(changelogCmd)
}
Expand Down Expand Up @@ -48,6 +49,11 @@ var changelogCmd = &cobra.Command{
return err
}

fromVersion, err := cmd.Flags().GetString("from")
if err != nil {
return err
}

maxFileSize, err := cmd.Flags().GetInt64("max-file-size")
if err != nil {
return err
Expand All @@ -63,7 +69,7 @@ var changelogCmd = &cobra.Command{
return err
}

releaseVersion, err := s.GetNextVersion(provider, force)
releaseVersion, err := s.GetNextVersion(provider, force, fromVersion)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/go-semantic-release/commands/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var hooksCmd = &cobra.Command{
return err
}

releaseVersion, err := s.GetNextVersion(provider, force)
releaseVersion, err := s.GetNextVersion(provider, force, "")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/go-semantic-release/commands/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var integrationsCmd = &cobra.Command{
return err
}

releaseVersion, err := s.GetNextVersion(provider, force)
releaseVersion, err := s.GetNextVersion(provider, force, "")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/go-semantic-release/commands/last.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var lastCmd = &cobra.Command{
return nil
}

releaseVersion, err := s.GetNextVersion(provider, force)
releaseVersion, err := s.GetNextVersion(provider, force, "")
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/go-semantic-release/commands/next.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var nextCmd = &cobra.Command{
return nil
}

releaseVersion, err := s.GetNextVersion(provider, force)
releaseVersion, err := s.GetNextVersion(provider, force, "")
if err != nil {
return err
}
Expand Down
34 changes: 16 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ go 1.16

require (
github.com/Masterminds/semver v1.5.0
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/go-git/go-billy/v5 v5.0.0
github.com/go-git/go-git/v5 v5.2.0
github.com/golang/protobuf v1.4.3 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect
github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2
github.com/google/go-github/v25 v25.1.3
github.com/imdario/mergo v0.3.11 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/magefile/mage v1.11.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.0
github.com/spf13/cobra v1.1.3
github.com/sergi/go-diff v1.2.0 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.3.0
github.com/stretchr/testify v1.7.0
github.com/tidwall/pretty v1.1.0 // indirect
github.com/tidwall/sjson v1.1.5
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 // indirect
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
golang.org/x/sys v0.0.0-20210223212115-eede4237b368 // indirect
google.golang.org/appengine v1.6.7 // indirect
github.com/tidwall/gjson v1.14.0 // indirect
github.com/tidwall/sjson v1.2.4
github.com/xanzy/ssh-agent v0.3.1 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit c5f993e

Please sign in to comment.