Skip to content

Commit

Permalink
Removing command line code #11
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Jan 27, 2016
1 parent d405f4e commit a7b20fd
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 446 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ Changelog of Git Changelog.
## Next release
### Other changes

[01c3111e3bd06ea](https://github.com/tomasbjerre/git-changelog-lib/commit/01c3111e3bd06ea) Tomas Bjerre *2015-12-08 18:43:35*
[d405f4e8ae5f34f](https://github.com/tomasbjerre/git-changelog-lib/commit/d405f4e8ae5f34f) Tomas Bjerre *2015-12-11 07:56:23*

Changing Jenkins plugin link to point at JenkinsCI

[296d811a7ec3492](https://github.com/tomasbjerre/git-changelog-lib/commit/296d811a7ec3492) Tomas Bjerre *2015-12-10 17:12:44*

Adding example template to readme


## 1.18
### Other changes

[25fad813507296c](https://github.com/tomasbjerre/git-changelog-lib/commit/25fad813507296c) Tomas Bjerre *2015-12-08 18:44:25*

Downgrading JGIT to 3.6.2 to be compatible with its older API

Expand Down
109 changes: 1 addition & 108 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ This software can be used:
* With a [Maven plugin](https://github.com/tomasbjerre/git-changelog-maven-plugin).
* With a [Jenkins plugin](https://github.com/jenkinsci/git-changelog-plugin).
* With a [Bitbucket Server plugin](https://github.com/tomasbjerre/git-changelog-bitbucket-plugin).
* From [command line](https://github.com/tomasbjerre/git-changelog-command-line).
* As a library [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22git-changelog-lib%22).
* From command line [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22git-changelog-lib%22) (the zip file).

Here is an example template. There are more examples [here](https://github.com/tomasbjerre/git-changelog/tree/master/src/test/resources/templates).
```
Expand Down Expand Up @@ -79,113 +79,6 @@ A page can be created in MediaWiki like this.
"Title of page");
```

### Command line
Or from command line:
```
-cl, --custom-issue-link <string> Custom issue link.
<string>: any string
Default: null
-cn, --custom-issue-name <string> Custom issue name.
<string>: any string
Default: null
-cp, --custom-issue-pattern <string> Custom issue pattern.
<string>: any string
Default: null
-df, --date-format <string> Format to use when printing dates.
<string>: any string
Default: YYYY-MM-dd HH:mm:ss
-fc, --from-commit <string> From commit.
<string>: any string
Default: 0000000000000000000000000000000000000000
-fr, --from-ref <string> From ref.
<string>: any string
Default: null
-gapi, --github-api <string> GitHub API.
<string>: any string
Default:
-h, --help <argument-to-print-help-for> <argument-to-print-help-for>: an argument to print help for
Default: If no specific parameter is given the whole usage text is given
-ip, --ignore-pattern <string> Ignore commits where pattern
matches message.
<string>: any string
Default: ^\[maven-release-plugin\].*|^\[Gradle Release Plugin\].*|^Merge.*
-jp, --jira-pattern <string> Jira issue pattern.
<string>: any string
Default: \b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\b
-jpw, --jira-password <string> Optional password to authenticate
with Jira.
<string>: any string
Default: \b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\b
-js, --jiraServer <string> Jira server. When a Jira server is
given, the title of the Jira issues can be
used in the changelog.
<string>: any string
Default:
-ju, --jira-username <string> Optional username to authenticate
with Jira.
<string>: any string
Default: \b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\b
-mp, --mediawiki-password <string> Password to authenticate with
MediaWiki.
<string>: any string
Default:
-mt, --mediawiki-title <string> Title of MediaWiki page.
<string>: any string
Default: null
-mu, --mediawiki-user <string> User to authenticate with MediaWiki.
<string>: any string
Default:
-murl, --mediawiki-url <string> Base URL of MediaWiki.
<string>: any string
Default:
-ni, --no-issue-name <string> Name of virtual issue that contains
commits that has no issue associated.
<string>: any string
Default: No issue
-of, --output-file <string> Write output to file.
<string>: any string
Default:
-r, --repo <string> Repository.
<string>: any string
Default: .
-ri, --remove-issue-from-message Dont print any issues in the
messages of commits.
Default: disabled
-rt, --readable-tag-name <string> Pattern to extract readable part of
tag.
<string>: any string
Default: /([^/]+?)$
-sf, --settings-file <string> Use settings from file.
<string>: any string
Default: null
-std, --stdout Print builder to <STDOUT>.
Default: disabled
-t, --template <string> Template to use. A default template
will be used if not specified.
<string>: any string
Default: git-changelog-template.mustache
-tc, --to-commit <string> To commit.
<string>: any string
Default: null
-tr, --to-ref <string> To ref.
<string>: any string
Default: refs/heads/master
-tz, --time-zone <string> TimeZone to use when printing dates.
<string>: any string
Default: UTC
-ut, --untagged-name <string> When listing commits per tag, this
will by the name of a virtual tag that
contains commits not available in any git
tag.
<string>: any string
Default: No tag
```

Creating a MediaWiki page can be done like this.
```
./git-changelog-lib -murl http://localhost/mediawiki -mu tomas -mp tomaskod -mt "Tomas Title" -t /home/bjerre/workspace/git-changelog-lib/changelog_mediawiki.mustache -ut "Next release"
```

## Supplied information

The template is supplied with a datastructure like:
Expand Down
23 changes: 15 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'net.researchgate:gradle-release:2.2.2'
classpath 'gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.10'
}
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'application'
apply plugin: 'signing'
apply plugin: 'com.bmuschko.nexus'
apply plugin: 'net.researchgate.release'
apply plugin: 'se.bjurr.gitchangelog.git-changelog-gradle-plugin'

group = 'se.bjurr.gitchangelog'
task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
gitChangelogPlugin.templateContent = new File('changelog.mustache').getText('UTF-8');
gitChangelogPlugin.filePath = "CHANGELOG.md";
gitChangelogPlugin.settingsFile = "changelog.json";
}

mainClassName = 'se.bjurr.gitchangelog.main.Main'
group = 'se.bjurr.gitchangelog'

sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand All @@ -31,7 +39,6 @@ repositories {
dependencies {
compile 'com.jayway.jsonpath:json-path:2.1.0'
compile 'com.google.guava:guava:11.0.1'
compile 'se.softhouse:jargo:0.1.1'
compile 'org.eclipse.jgit:org.eclipse.jgit:3.6.2.201501210735-r'
compile 'com.github.spullara.mustache.java:compiler:0.8.18'
compile 'com.google.code.gson:gson:2.4'
Expand All @@ -55,12 +62,12 @@ modifyPom {
project {
name 'GIT Changelog'
description 'Library that generates changelog from a GIT repository.'
url 'https://github.com/tomasbjerre/git-changelog'
url 'https://github.com/tomasbjerre/git-changelog-lib'
inceptionYear '2015'
scm {
url 'https://github.com/tomasbjerre/git-changelog'
connection 'scm:https://tomasbjerre@github.com/tomasbjerre/git-changelog.git'
developerConnection 'scm:git://github.com/tomasbjerre/git-changelog.git'
url 'https://github.com/tomasbjerre/git-changelog-lib'
connection 'scm:https://tomasbjerre@github.com/tomasbjerre/git-changelog-lib.git'
developerConnection 'scm:git://github.com/tomasbjerre/git-changelog-lib.git'
}

licenses {
Expand Down
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/bash
./gradlew clean build
./generate_changelog.sh
./gradlew clean gitChangelog build
2 changes: 1 addition & 1 deletion generate_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ ROOT_FOLDER=`pwd`
cd build/distributions
unzip *T.zip
cd *T
./bin/git-changelog-lib -t $ROOT_FOLDER/changelog.mustache -sf $ROOT_FOLDER/changelog.json -of $ROOT_FOLDER/CHANGELOG.md
./bin/git-changelog-lib -t $ROOT_FOLDER/changelog.mustache -sf $ROOT_FOLDER/changelog.json -of $ROOT_FOLDER/CHANGELOG.md -r /home/bjerre/sandbox/timerepo
#./bin/git-changelog-lib -t $ROOT_FOLDER/changelog_mediawiki.mustache -sf $ROOT_FOLDER/changelog.json -murl http://localhost/mediawiki -mu tomas -mp tomaskod -mt "Tomas Title" -gapi https://api.github.com/repos/tomasbjerre/git-changelog-lib

0 comments on commit a7b20fd

Please sign in to comment.