Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tool-maven] Add blog release generator maven cmd #7

Merged
merged 1 commit into from
Dec 20, 2022
Merged

Conversation

fpapon
Copy link
Member

@fpapon fpapon commented Dec 15, 2022

No description provided.

Copy link
Contributor

@rmannibucau rmannibucau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few details/questions (more notes to ensure it is not passing under your radar) but look good to merge

.build();
try (final Jsonb jsonb = JsonbBuilder.create(new JsonbConfig().setProperty("johnzon.skip-cdi", true))) {
final var workDir = Files.createDirectories(Paths.get(workdir));
Files.deleteIfExists(Path.of(workDir + "/releases-blog-post.adoc"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because if you run it several time, it will append so we need to clean up at each run.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, it does cause you asked to append, if you dont it does not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We append for each repository, so another option will be to write to the file at the end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change flow

var out = new StringBuilder();

out.append("== ").append(githubRepository.replaceAll("yupiik/", "")).append("\n\n");
DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datetimeformatter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, good catch

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

throw new IllegalStateException(e);
}
});
try (final var outputStream = Files.newOutputStream(Path.of(workDir + "/releases-blog-post.adoc"), APPEND, CREATE)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files.writeString?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@fpapon fpapon force-pushed the blog-release branch 3 times, most recently from 2ea414b to ab151f2 Compare December 15, 2022 16:44
@fpapon fpapon merged commit a724b4f into master Dec 20, 2022
@fpapon fpapon deleted the blog-release branch December 20, 2022 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants