Skip to content

Commit

Permalink
Fixed merge issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Pigram committed Sep 3, 2013
1 parent fdbdff3 commit 4718879
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ changelog*
target
lib
credentials.properties
!/src/net/foxopen/jira/changelog/
!/test/net/foxopen/jira/changelog/
9 changes: 6 additions & 3 deletions src/net/foxopen/jira/changelog/Changelog.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public static void main(String[] args)
System.exit(2);
}
Logger.log("--changelog-file-name found. Using " + filenameList + " as changelog files.");
} else if (args[currentArgument].equals("--changelog-description-field")) {
descriptionField = args[++currentArgument];
Logger.log("--changelog-description-field found. Using " + descriptionField + " as the Changelog Description field.");
} else {
Logger.err("Unknown argument: " + args[currentArgument]);
System.exit(2);
Expand Down Expand Up @@ -116,7 +119,7 @@ public static void main(String[] args)
}
}

JiraAPI jiraApi = new JiraAPI(jiraUsername, jiraPassword, jiraURL, jql);
JiraAPI jiraApi = new JiraAPI(jiraUsername, jiraPassword, jiraURL, jql, descriptionField);

if (objectCachePath != null) {
VersionInfoCache cache = new VersionInfoCache(jiraProjectKey, objectCachePath);
Expand All @@ -128,10 +131,10 @@ public static void main(String[] args)
Logger.log("Building changelog files.");

if (filenameList == null) {
// default all filenames to changelog.txt if none have been specified
// default all filenames to changelog#.txt if none have been specified
files = new String[templates.length];
for (int i = 0; i < files.length; i++) {
files[i] = "changelog.txt";
files[i] = "changelog" + i + ".txt";
}
}
clWriter.build(jiraApi.getVersionInfoList(), files, templates);
Expand Down
19 changes: 2 additions & 17 deletions test/net/foxopen/jira/changelog/ChangelogTemplateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,7 @@ public void testHTMLChangelog() throws Exception {
public void testXMLChangelog() throws Exception {
System.out.println("XMLChangelog");
try {
JiraAPI jira = new JiraAPI("jenkins", "j3nk1ns!", "https://fivium.atlassian.net", "", "");
jira.fetchVersionDetails("TESTPROJ", "2.0.1");
String[] files = new String[2];
files[0] = "file.mustache";
files[1] = "module.mustache";
ChangelogBuilder clWriter = new ChangelogBuilder();
clWriter.build(jira.getVersionInfoList(), "changelog", files);

// attempt to open the generated changelog file. If an IOException is thrown, then the file does not exist.
FileReader reader = new FileReader("changelog1.txt");
reader.close();
reader = new FileReader("changelog2.txt");
reader.close();
} catch (IOException e) {
fail("File does not exist!");
System.err.println(e.getMessage());
ChangelogTemplate.createChangelog(versions, output, "examples/xml.mustache");
} catch (Exception e) {
fail("Exception raised.");
e.printStackTrace();
Expand Down Expand Up @@ -139,4 +124,4 @@ public void testFullRun() throws Exception {
File f = new File("changelog.html");
assertTrue(f.exists());
}
}
}

0 comments on commit 4718879

Please sign in to comment.