mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-24 14:48:28 -06:00
Merge 7e9bf56c763729a7bd2757897586690f1859d560 into f7a31aa3dee1f37cb90a22303b6d45bec0033a3f
This commit is contained in:
commit
6ccc341511
32
scripts/release-utils/changelog-template.ecr
Normal file
32
scripts/release-utils/changelog-template.ecr
Normal file
@ -0,0 +1,32 @@
|
||||
## <%=version%>
|
||||
<% unless is_patch_release %>
|
||||
### Wrap up
|
||||
<% end %>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
|
||||
<% unless is_patch_release %>
|
||||
### New features & important changes
|
||||
#### For users
|
||||
- Praesent a orci non elit interdum faucibus ut placerat dui
|
||||
- Aenean sit amet dolor at felis tempus eleifend
|
||||
#### For instance owners
|
||||
- Donec consequat magna sit amet fringilla posuere.
|
||||
- Fusce a augue quis neque iaculis dignissim
|
||||
#### For developers
|
||||
- Nam sed elit a metus congue sagittis.
|
||||
- Sed sollicitudin eros et rhoncus pharetra.
|
||||
|
||||
### Bugs fixed
|
||||
#### User-side
|
||||
- Mauris vitae leo elementum, molestie metus in, tristique lorem.
|
||||
- Cras nec elit a sapien consectetur tristique.
|
||||
#### For instance owners
|
||||
- Nunc cursus velit ut finibus facilisis.
|
||||
- Nullam et mi vel felis aliquet euismod eu vel lacus.
|
||||
#### For developers
|
||||
- Nulla elementum dui a ex tristique, non imperdiet ante finibus.
|
||||
- Aliquam in sem quis velit efficitur efficitur.
|
||||
<% end -%>
|
||||
|
||||
### Full list of pull requests merged since the last release (newest first)
|
||||
|
||||
<%= prs.join('\n') %>
|
||||
39
scripts/release-utils/convert_changelog.cr
Normal file
39
scripts/release-utils/convert_changelog.cr
Normal file
@ -0,0 +1,39 @@
|
||||
# A quick and dirty script to convert Github's automatically generated list of merged PRs since last
|
||||
# release into a partially filled Invidious changelog.
|
||||
#
|
||||
# Reads from an "auto_changelog.md" file in the working directory
|
||||
#
|
||||
# `crystal run scripts/release-utils/convert_changelog.cr -- <VERSION>`
|
||||
#
|
||||
|
||||
require "ecr"
|
||||
|
||||
abort "Missing version argument" unless (version = ARGV[0]?)
|
||||
|
||||
unless (semantic_version = version.match(/v(\d+)\.(\d+)\.(\d+)/))
|
||||
abort "Version must be format v{major}.{date}.{patch}"
|
||||
end
|
||||
|
||||
# index zero is reserved for the matched string
|
||||
is_patch_release = semantic_version[3] != "0"
|
||||
|
||||
autogenerated_changelog = File.read("./auto_changelog.md")
|
||||
|
||||
CORE_TEAM = {
|
||||
"samantazfox", "unixfox", "syeopite", "fijxu", "alexmaras", "thefrenchghosty", "perflyst",
|
||||
}
|
||||
|
||||
MATCH_PULL_REQUEST_PATTERN = /(?<body>.*) by @(?<username>[a-zA-Z0-9_\-\[\]]+) in (?<link>https:\/\/github.com\/iv-org\/invidious\/pull\/\d+)/
|
||||
prs = autogenerated_changelog.scan(MATCH_PULL_REQUEST_PATTERN).map do |pr|
|
||||
username = pr["username"]
|
||||
|
||||
if CORE_TEAM.includes?(username.downcase)
|
||||
attribution = "by"
|
||||
else
|
||||
attribution = "thanks"
|
||||
end
|
||||
|
||||
"#{pr["body"]} (#{pr["link"]}, #{attribution} @#{username})"
|
||||
end
|
||||
|
||||
puts ECR.render("scripts/release-utils/changelog-template.ecr")
|
||||
Loading…
x
Reference in New Issue
Block a user