Skip to content

Commit

Permalink
allow non github hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicwest committed Aug 12, 2017
1 parent 6985de5 commit 116625a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
## [0.0.1] - 2017-08-12
### Added
- This CHANGELOG file!

### Changed
- ProjectPath to ProjectURL in `init` to allow for non github hosts

[Unreleased]: https://github.com/nicwest/kacl/compare/TAIL...HEAD
### Fixed
- additional new lines being added when documenting a new release


[Unreleased]: https://github.com/nicwest/kacl/compare/0.0.1...HEAD
[0.0.1]: https://github.com/nicwest/kacl/compare/TAIL...0.0.1
9 changes: 5 additions & 4 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import (
)

type initCmdConfig struct {
ProjectPath string
InitialTag string
ProjectURL string
InitialTag string
}

// V1Template is the default keep a change log v1.0.0 template
const V1Template string = `# Changelog
All notable changes to this project will be documented in this file.
Expand All @@ -26,7 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- This CHANGELOG file!
[Unreleased]: https://github.com/{{ .ProjectPath }}/compare/{{ .InitialTag }}...HEAD `
[Unreleased]: {{ .ProjectURL }}/compare/{{ .InitialTag }}...HEAD `

// initCmd represents the init command
var initCmd = &cobra.Command{
Expand All @@ -47,7 +48,7 @@ http://keepachangelog.com/en/1.0.0/ format.`,

var cfg initCmdConfig

prompt.For("Project path", &cfg.ProjectPath)
prompt.For("Project URL", &cfg.ProjectURL)
prompt.ForWithDefault("Initial commit", "0.0.1", &cfg.InitialTag)

t := template.Must(template.New("version").Parse(V1Template))
Expand Down
1 change: 0 additions & 1 deletion cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ a new change with the given tag.`,
changes.WriteTo(rest)
rest.WriteString("\n")
rest.WriteString(contents.Rest)
rest.WriteString("\n")
contents.Rest = rest.String()

if len(contents.Refs) > 0 {
Expand Down

0 comments on commit 116625a

Please sign in to comment.