-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
813 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
return { | ||
["CHANGES.md"] = function(version, content) | ||
-- either replace the first line with the concrete release number or | ||
-- add an "upcoming" line, depending on the given version string | ||
|
||
local current_first_line = content:match("^([^\n]*)\n") or "" | ||
local current_version = current_first_line:match("%d+%.%d+%.%d+") | ||
local pure_version = version:match("%d+%.%d+%.%d+") | ||
|
||
local format_string | ||
if current_version == nil or current_version == pure_version then | ||
-- if the current version is an upcoming version, or if both pure | ||
-- versions are the same, replace the first line | ||
format_string = "%s\n%s" | ||
content = content:gsub("^[^\n]*\n", "", 1) | ||
else | ||
-- otherwise, prepend a new line | ||
format_string = "%s\n\n%s" | ||
end | ||
|
||
local first_line | ||
if version:find("%-SNAPSHOT$") then | ||
-- if the new version is a snapshot, use an "upcoming" header | ||
first_line = "# Changes since latest release" | ||
else | ||
-- otherwise use the concrete version | ||
first_line = "# Changes in " .. version | ||
end | ||
|
||
return (format_string):format(first_line, content) | ||
end, | ||
|
||
["Cargo.toml"] = function(version, content) | ||
-- replace the first "version" attribute, which is most likely our | ||
-- own, with the current version string | ||
return content:gsub( | ||
'version = %b""', ('version = "%s"'):format(version), 1 | ||
) | ||
end, | ||
|
||
VERSION = function(version) | ||
return version | ||
end | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
column_limit: 78 | ||
indent_width: 4 | ||
use_tab: false | ||
tab_width: 4 | ||
continuation_indent_width: 4 | ||
spaces_before_call: 1 | ||
keep_simple_control_block_one_line: false | ||
keep_simple_function_one_line: false | ||
align_args: true | ||
break_after_functioncall_lp: true | ||
break_before_functioncall_rp: true | ||
spaces_inside_functioncall_parens: false | ||
spaces_inside_functiondef_parens: false | ||
align_parameter: true | ||
chop_down_parameter: true | ||
break_after_functiondef_lp: true | ||
break_before_functiondef_rp: true | ||
align_table_field: true | ||
break_after_table_lb: true | ||
break_before_table_rb: true | ||
chop_down_table: true | ||
chop_down_kv_table: true | ||
table_sep: "," | ||
extra_sep_at_table_end: false | ||
column_table_limit: 78 | ||
spaces_inside_table_braces: false | ||
break_after_operator: true | ||
double_quote_to_single_quote: false | ||
single_quote_to_double_quote: false | ||
spaces_around_equals_in_field: true | ||
line_breaks_after_function_body: 1 | ||
line_separator: input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changes in 0.1.0 | ||
|
||
Initial release. |
Oops, something went wrong.