diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c84fa39..e61a6816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ Changelog ======================================== +v1.2.4 - 2024-10-31 +---------------------------------------- + +- Add `command.variables` as a convenience utility for defining global command variables [`6538886`](https://github.com/DannyBen/bashly/commit/6538886) +- Update JSON schema to include `command.variables` [`28953fb`](https://github.com/DannyBen/bashly/commit/28953fb) +- Refactor `command.variables` to a new `Variable` object [`3e5a060`](https://github.com/DannyBen/bashly/commit/3e5a060) +- Add black and white to color library [`0573e0f`](https://github.com/DannyBen/bashly/commit/0573e0f) +- Compare [`v1.2.3..v1.2.4`](https://github.com/dannyben/bashly/compare/v1.2.3..v1.2.4) + + v1.2.3 - 2024-10-16 ---------------------------------------- diff --git a/Dockerfile b/Dockerfile index 1eb2942b..ff91ef98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM dannyben/alpine-ruby:3.3.3 ENV PS1="\n\n>> bashly \W \$ " -ENV BASHLY_VERSION=1.2.4 +ENV BASHLY_VERSION=1.2.5 WORKDIR /app diff --git a/examples/render-mandoc/docs/download.1 b/examples/render-mandoc/docs/download.1 index 9f75126e..f600827e 100644 --- a/examples/render-mandoc/docs/download.1 +++ b/examples/render-mandoc/docs/download.1 @@ -1,6 +1,6 @@ .\" Automatically generated by Pandoc 3.2 .\" -.TH "download" "1" "October 2024" "Version 0.1.0" "Sample application" +.TH "download" "1" "November 2024" "Version 0.1.0" "Sample application" .SH NAME \f[B]download\f[R] \- Sample application .SH SYNOPSIS diff --git a/examples/render-mandoc/docs/download.md b/examples/render-mandoc/docs/download.md index bec7a9c5..99c93073 100644 --- a/examples/render-mandoc/docs/download.md +++ b/examples/render-mandoc/docs/download.md @@ -1,6 +1,6 @@ % download(1) Version 0.1.0 | Sample application % Lana Lang -% October 2024 +% November 2024 NAME ================================================== diff --git a/lib/bashly/version.rb b/lib/bashly/version.rb index 0764bd0f..7ca4fec1 100644 --- a/lib/bashly/version.rb +++ b/lib/bashly/version.rb @@ -1,3 +1,3 @@ module Bashly - VERSION = '1.2.4' + VERSION = '1.2.5' end diff --git a/lib/bashly/views/command/function.gtx b/lib/bashly/views/command/function.gtx index 1e91fab0..00bfd52d 100644 --- a/lib/bashly/views/command/function.gtx +++ b/lib/bashly/views/command/function.gtx @@ -1,7 +1,7 @@ = view_marker > {{ function_name }}_command() { -= render(:variables).indent(2) if variables&.any? += render(:variables).indent(2) = load_user_file(filename).indent 2 > } > diff --git a/lib/bashly/views/command/initialize.gtx b/lib/bashly/views/command/initialize.gtx index 2ae837fd..3be382b4 100644 --- a/lib/bashly/views/command/initialize.gtx +++ b/lib/bashly/views/command/initialize.gtx @@ -7,6 +7,7 @@ if root_command? > + = render(:variables).indent(2) = render(:environment_variables_default).indent 2 end diff --git a/lib/bashly/views/command/run.gtx b/lib/bashly/views/command/run.gtx index e3af52c4..8dda6762 100644 --- a/lib/bashly/views/command/run.gtx +++ b/lib/bashly/views/command/run.gtx @@ -9,7 +9,6 @@ if has_unique_args_or_flags? > declare -A unique_lookup=() end -= render(:variables).indent(2) if variables&.any? > normalize_input "$@" > parse_requirements "${input[@]}" if user_file_exist?('before') diff --git a/lib/bashly/views/command/variables.gtx b/lib/bashly/views/command/variables.gtx index 2c28db56..c6c53cee 100644 --- a/lib/bashly/views/command/variables.gtx +++ b/lib/bashly/views/command/variables.gtx @@ -1,5 +1,7 @@ -= view_marker +if variables.any? + = view_marker -variables.each do |var| - = var.render(:definition) -end + variables.each do |var| + = var.render(:definition) + end +end \ No newline at end of file diff --git a/spec/approvals/examples/render-mandoc b/spec/approvals/examples/render-mandoc index ca383f90..5c3d0ca3 100644 --- a/spec/approvals/examples/render-mandoc +++ b/spec/approvals/examples/render-mandoc @@ -44,4 +44,4 @@ ISSUE TRACKER AUTHORS Lana Lang. -Version 0.1.0 October 2024 download(1) +Version 0.1.0 November 2024 download(1)