Skip to content

Commit 116625a

Browse files
committed
allow non github hosts
1 parent 6985de5 commit 116625a

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8-
### Added
8+
## [0.0.1] - 2017-08-12
9+
### Added
910
- This CHANGELOG file!
1011

12+
### Changed
13+
- ProjectPath to ProjectURL in `init` to allow for non github hosts
1114

12-
[Unreleased]: https://github.com/nicwest/kacl/compare/TAIL...HEAD
15+
### Fixed
16+
- additional new lines being added when documenting a new release
17+
18+
19+
[Unreleased]: https://github.com/nicwest/kacl/compare/0.0.1...HEAD
20+
[0.0.1]: https://github.com/nicwest/kacl/compare/TAIL...0.0.1

cmd/init.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import (
1111
)
1212

1313
type initCmdConfig struct {
14-
ProjectPath string
15-
InitialTag string
14+
ProjectURL string
15+
InitialTag string
1616
}
1717

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

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

4849
var cfg initCmdConfig
4950

50-
prompt.For("Project path", &cfg.ProjectPath)
51+
prompt.For("Project URL", &cfg.ProjectURL)
5152
prompt.ForWithDefault("Initial commit", "0.0.1", &cfg.InitialTag)
5253

5354
t := template.Must(template.New("version").Parse(V1Template))

cmd/release.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ a new change with the given tag.`,
3737
changes.WriteTo(rest)
3838
rest.WriteString("\n")
3939
rest.WriteString(contents.Rest)
40-
rest.WriteString("\n")
4140
contents.Rest = rest.String()
4241

4342
if len(contents.Refs) > 0 {

0 commit comments

Comments
 (0)