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

release blog: generate release post contents #87

Merged
merged 6 commits into from
Dec 5, 2024

Conversation

otegami
Copy link
Contributor

@otegami otegami commented Dec 4, 2024

GitHub: GH-83

In this PR, we implement a Rake task for generating release announce posts with contents in blog.

Generate release announce posts

$ rake release:blog:generate
$ tree . | grep 2024-11-05-groonga-14.1.0.md
  │       └── 2024-11-05-groonga-14.1.0.md
  │   │   └── 2024-11-05-groonga-14.1.0.md
$ cat en/_posts/2024-11-15-groonga-14.1.0.md
---
layout: post.en
title: Groonga 14.1.0 has been released
description: Groonga 14.1.0 has been released!
---

## Groonga 14.1.0 has been released

Groonga 14.1.0 has been released!

For installation instructions on your environments, please see the [Installation Guide](/docs/install.html).

For the information on the changes in this release, please see the [Release Note](/docs/news/14.html#release-14-1-0).

$ cat ja/_posts/2024-11-05-groonga-14.1.0.md
---
layout: post.ja
title: Groonga 14.1.0リリース
description: Groonga 14.1.0をリリースしました!
---

## Groonga 14.1.0リリース

Groonga 14.1.0をリリースしました!

それぞれの環境毎のインストール方法は、[インストール](/ja/docs/install.html)をご確認ください。

主な変更点は、[リリースノート](/ja/docs/news/14.html#release-14-1-0)をご確認ください。

GitHub: groongaGH-83

In this PR, we implement a Rake task for generating release
announce posts in blog.

Generate release announce posts

```console
$ rake release:blog:generate
$ tree . | grep 2024-11-15-groonga-14.1.0.md
  │       └── 2024-11-15-groonga-14.1.0.md
  │   │   └── 2024-11-15-groonga-14.1.0.md
```

```console
$ cat en/_posts/2024-11-15-groonga-14.1.0.md
---
layout: post.en
title: Groonga 14.1.0 has been released
description: Groonga 14.1.0 has been released!
---

Groonga 14.1.0 has been released!

For installation instructions on your environments, please see the [Installation Guide](/docs/install.html).

For the information on the changes, please see the [Release Note](/docs/news/14.html#release-14-1-0-2024-12-04).

$ cat ja/_posts/2024-11-15-groonga-14.1.0.md
cat ja/_posts/2024-11-05-groonga-14.1.0.md
---
layout: post.ja
title: Groonga 14.1.0リリース
description: Groonga 14.1.0をリリースしました!
---

Groonga 14.1.0をリリースしました!

それぞれの環境毎のインストール方法は、[インストール](/ja/docs/install.html)をご確認ください。

主な変更点のついては、[リリースノート](/ja/docs/news/14.html#release-14-1-0)をご確認ください。
```
@otegami otegami force-pushed the release-post-contents branch from 8f49ea3 to 9502f05 Compare December 4, 2024 23:31
@otegami otegami marked this pull request as ready for review December 4, 2024 23:35
release_task.rb Outdated

#{@product} #{@version}をリリースしました!

それぞれの環境毎のインストール方法は、[インストール](/ja/docs/install.html)をご確認ください。
Copy link
Contributor

Choose a reason for hiding this comment

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

様々な @product で利用する前提の作りだと思いますが、 /ja/docs/install.html このパスは共通なんでしたっけ?

Copy link
Contributor Author

@otegami otegami Dec 4, 2024

Choose a reason for hiding this comment

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

GroongaとMroongaは共通なのですが、PGroongaに関しては共通ではないですmm
メソッドに切り出して、overrideしやすいようにしておいたほうが良さそうですね!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix: afe8102

@kou kou changed the title release blog: generate release post with contents release blog: generate release post content Dec 5, 2024
release_task.rb Outdated Show resolved Hide resolved
release_task.rb Outdated

それぞれの環境毎のインストール方法は、[インストール](/ja#{product_install_url})をご確認ください。

主な変更点のついては、[リリースノート](/ja#{product_release_note_url})をご確認ください。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
主な変更点のついては、[リリースノート](/ja#{product_release_note_url})をご確認ください。
主な変更点は[リリースノート](/ja#{product_release_note_url})をご確認ください。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix: 007789d

release_task.rb Outdated Show resolved Hide resolved
release_task.rb Outdated
Comment on lines 112 to 119
case locale
when "ja"
post_ja_content
when "en"
post_en_content
else
raise "#{locale} isn't supported for release announce posts in blog."
end
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
case locale
when "ja"
post_ja_content
when "en"
post_en_content
else
raise "#{locale} isn't supported for release announce posts in blog."
end
__send__("post_#{locale}_content")

post_content_#{locale}にしてpost_contentをprefixにして関連処理であることをアピールしたほうがいいかも。

Copy link
Contributor Author

@otegami otegami Dec 5, 2024

Choose a reason for hiding this comment

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

fix: ed63a9e
ありがとうございます。わざわざ例外を挙げなくても、NoMethodErrorで気づけますし何をしているか、たしかにわかりやすいですね 🙏🏾

post_content_#{locale}にしてpost_contentをprefixにして関連処理であることをアピールしたほうがいいかも。

確かにです!

@otegami
Copy link
Contributor Author

otegami commented Dec 5, 2024

ここまで頂いたレビューコメントの対応を行いました!

@kou
Copy link
Member

kou commented Dec 5, 2024

descriptionを最新情報に更新してもらえますか?

@otegami otegami changed the title release blog: generate release post content release blog: generate release post contents Dec 5, 2024
@otegami
Copy link
Contributor Author

otegami commented Dec 5, 2024

すみません。更新しましたmm

@kou kou merged commit bc29758 into groonga:gh-pages Dec 5, 2024
1 check passed
@otegami otegami deleted the release-post-contents branch December 5, 2024 01:20
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.

3 participants