Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
FloGa committed Mar 25, 2022
2 parents c26ad5a + 5b9d8d8 commit 70476af
Show file tree
Hide file tree
Showing 11 changed files with 813 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .git-bump.lua
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
}
32 changes: 32 additions & 0 deletions .lua-format
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
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changes in 0.1.0

Initial release.
Loading

0 comments on commit 70476af

Please sign in to comment.