8 Commits

Author SHA256 Message Date
6eec80f1f0 Accepting request 1301140 from devel:languages:go
- Update to version 3.12.0:
  * CHANGELOG: add entry for v3.12.0
  * README.md: add another example to caveats
  * interp: add HandlerContext.Builtin
  * interp: add test cases with exit inside a process substitution
  * interp: add HandlerContext.Pos
  * interp: swap math/rand for math/rand/v2
  * interp: add exitStatus.ok for `code == 0` comparisons
  * interp: move oneIf under exitStatus
  * interp: export IsBuiltin
  * interp: refactor builtins to return an exitStatus
  * interp: remove Runner.exitShell
  * interp: simplify trapping on error
  * interp: reduce the size of exitStatus
  * interp: convert strings to integers as int64
  * interp: reject return with invalid arguments
  * syntax: skip allocating in SplitBraces when there are no braces
  * interp: avoid always copying CallExpr.Args to expand aliases
  * interp: move Runner.setFatalErr to exitStatus
  * interp: forward custom exit status errors when using `wait`
  * interp: keep custom exit status errors when using a naked `exit`
  * interp: positional parameters are unset when missing
  * interp: support reading $RANDOM and $SRANDOM
  * interp: add and fix more subshell exit and errexit edge cases
  * interp: propagate custom exit status errors in command substitutions
  * interp: simplify code with the exitStatus type
  * interp: use the Runner.Run context for calls to ReadDirHandlerFunc2
  * interp: group "exit status" Runner fields into a type
  * interp: add more custom exit error test cases
  * interp: simplify returning exit codes in builtinCode (forwarded request 1301138 from alessio.biancalana)

OBS-URL: https://build.opensuse.org/request/show/1301140
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shfmt?expand=0&rev=2
2025-08-25 18:37:55 +00:00
4a4bea2426 Accepting request 1301138 from home:alessio.biancalana:branches:devel:languages:go
- Update to version 3.12.0:
  * CHANGELOG: add entry for v3.12.0
  * README.md: add another example to caveats
  * interp: add HandlerContext.Builtin
  * interp: add test cases with exit inside a process substitution
  * interp: add HandlerContext.Pos
  * interp: swap math/rand for math/rand/v2
  * interp: add exitStatus.ok for `code == 0` comparisons
  * interp: move oneIf under exitStatus
  * interp: export IsBuiltin
  * interp: refactor builtins to return an exitStatus
  * interp: remove Runner.exitShell
  * interp: simplify trapping on error
  * interp: reduce the size of exitStatus
  * interp: convert strings to integers as int64
  * interp: reject return with invalid arguments
  * syntax: skip allocating in SplitBraces when there are no braces
  * interp: avoid always copying CallExpr.Args to expand aliases
  * interp: move Runner.setFatalErr to exitStatus
  * interp: forward custom exit status errors when using `wait`
  * interp: keep custom exit status errors when using a naked `exit`
  * interp: positional parameters are unset when missing
  * interp: support reading $RANDOM and $SRANDOM
  * interp: add and fix more subshell exit and errexit edge cases
  * interp: propagate custom exit status errors in command substitutions
  * interp: simplify code with the exitStatus type
  * interp: use the Runner.Run context for calls to ReadDirHandlerFunc2
  * interp: group "exit status" Runner fields into a type
  * interp: add more custom exit error test cases
  * interp: simplify returning exit codes in builtinCode

OBS-URL: https://build.opensuse.org/request/show/1301138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=7
2025-08-24 15:57:03 +00:00
5c455f3f23 Accepting request 1100202 from home:jfkw:branches:devel:languages:go
Revise changelog to organize as packaging improvements:
  * Add basic %check to execute the binary --help, also --version
    since that is an open issue for this package.
  * Fix rpmlint warnings to not repeat package name in
    summary. This package currently only includes the formatter
    binary, not the parser or interpreter. Update the summary and
    description to reflect that.

OBS-URL: https://build.opensuse.org/request/show/1100202
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=6
2023-07-23 18:19:55 +00:00
ce9e5dbd00 Accepting request 1100183 from home:jfkw:branches:devel:languages:go
- Use BuildRequires: golang(API) >= 1.19 as a clearer way to
  indicate the minimum Go toolchain version in go.mod is go1.19.
- Add comment that embedding version info via ldflags is necessary
  here due to upstream code choice to always return (devel).

OBS-URL: https://build.opensuse.org/request/show/1100183
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=5
2023-07-23 16:56:15 +00:00
b9e5e8475f Accepting request 1100096 from home:zzndb001
- Update to version 3.7.0:
  * prepare for v3.7.0
  * cmd/shfmt: bump Dockerfile image versions
  * CHANGELOG: start the release notes for v3.7.0
  * syntax: stop embedding Pos in error struct types
  * all: assume C.UTF-8 is available in the tests
  * syntax: treat &> as an error in POSIX mode
  * syntax: run "confirm" shell commands in a temp dir
  * syntax: don't parse `$foo#bar` as a comment
  * all: apply minor suggestions from gopls
  * syntax: add TODO about writer methods on Printer
- Add ldflags version info back since --version option always print (devel)

OBS-URL: https://build.opensuse.org/request/show/1100096
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=4
2023-07-23 15:55:42 +00:00
3acf330861 Accepting request 990060 from devel:languages:go
New package shfmt v3.5.1 is a shell parser, formatter, and interpreter with bash support.

Requested for submission to Factory by @fbonazzi

OBS-URL: https://build.opensuse.org/request/show/990060
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/shfmt?expand=0&rev=1
2022-07-19 15:19:46 +00:00
bef9fccca5 Accepting request 990059 from home:jfkw:branches:devel:languages:go
- Revise packaging to align with Go application package patterns
  * Drop dependency on golang-packaging obsolete macros use GOPATH
  * Use obs-service-go_modules for dependency vendoring
  * Drop go build ldflags version info as go1.18+ embeds metadata
  * Drop separate package installing shfmt application source

OBS-URL: https://build.opensuse.org/request/show/990059
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=2
2022-07-19 00:03:17 +00:00
e2b3fad0f6 Accepting request 984979 from home:zzndb001
Add shfmt as a shell formatter

OBS-URL: https://build.opensuse.org/request/show/984979
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/shfmt?expand=0&rev=1
2022-06-27 05:08:30 +00:00