You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RELEASE.md
+61-11Lines changed: 61 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# go-script-bash v1.6.0
1
+
# go-script-bash v1.7.0
2
2
3
-
This is a minor update to add the capability to `go-template` to download a release tarball from GitHub rather than using `git clone` to add the go-script-bash framework to a project working directory.
3
+
This is a minor update to add a few test helpers, `_GO_PLATFORM` variables and the `./go goinfo` command, several file system processing modules, and a handful of project improvements.
4
4
5
5
## The `./go` script: a unified development environment interface
6
6
@@ -25,25 +25,75 @@ This software is made available as [Open Source software][oss-def] under the [IS
25
25
26
26
## What's new in this release
27
27
28
-
All of the issues and pull requests for this release are visible in the [v1.6.0 milestone][].
28
+
All of the issues and pull requests for this release are visible in the [v1.7.0 milestone][].
### Download a go-script-bash release tarball from GitHub in `go-template`
32
+
### `./go null`
33
33
34
-
Thanks to [Juan Saavedra][elpaquete], `go-template` now has the capability to download and unpack a release tarbal from GitHub in order to add the go-script-bash framework to a project's working directory, rather than relying on `git clone`. Now `git clone` will be used as a backup in case the system doesn't have the tools to download and unpack the tarball, or the operation fails for some reason.
34
+
The `./go null` command verifies that the framework is installed and functioning properly (#190).
35
35
36
-
[elpaquete]: https://github.com/elpaquete
36
+
### New test helpers
37
+
38
+
There are a few powerful new test helper functions:
39
+
40
+
*`create_forwarding_script` (#192, #195): Used to create a wrapper in `BATS_TEST_BINDIR` to make a system program accessible while restricting `PATH` via `PATH="$BATS_TEST_BINDIR"`.
41
+
*`restore_programs_in_path` (#196): Allows a single call to remove multiple command stub scripts.
42
+
*`run_test_script` (#196): Creates and runs a test script in one step, so that create_bats_test_script and run need not be called separately.
43
+
*`run_bats_test_suite` (#196): A specialized version of `run_test_script` specifically for generating and running Bats test cases.
44
+
*`run_bats_test_suite_in_isolation` (#196): An even more specialized version of `run_bats_test_suite` to ensure that `PATH` is restricted to `BATS_TEST_BINDIR` and the Bats `libexec/` directory within the suite.
45
+
*`lib/bats/background-process` (#197): Helpers for managing and validating background processes.
46
+
*`skip_if_none_present_on_system` (#198): Skips a test if none of the specified system programs are available.
47
+
48
+
### `_GO_PLATFORM` vars and `./go goinfo` command
49
+
50
+
The `lib/platform` module introduced in #200 provides an interface to detect on which system the script is running. Is parses [/etc/os-release][os-release] if it's available; otherwise uses `OSTYPE`, `uname -r`, and `sw_vers -productVersion` (on macOS).
The `./go goinfo` command introduced in #216 uses the `lib/platform` module to print version information about the go-script-bash framework, Bash, and the host operating system:
55
+
56
+
```bash
57
+
$ ./go goinfo
58
+
59
+
_GO_CORE_VERSION: v1.7.0
60
+
BASH_VERSION: 4.4.12(1)-release
61
+
OSTYPE: darwin16.3.0
62
+
_GO_PLATFORM_ID: macos
63
+
_GO_PLATFORM_VERSION_ID: 10.13
64
+
```
65
+
66
+
### File system processing modules
67
+
68
+
Introduced in #201, `@go.native_file_path_or_url` from `lib/portability` converts a file system path or `file://` URL to a platform-native path. This is necessitated by MSYS2, especially Git for Windows, which has system programs which expect Windows-native paths as input, or whose output will reflect Windows-native paths. It's used in several tests, as well as the `./go get` command.
69
+
70
+
The `lib/path` module introduced in #203 and #206 includes functions to canonicalize file system paths, resolve symlinks, and walk directories.
71
+
72
+
`lib/fileutil` from #204 and updated in #207 and #210 contains functions to safely create directories (with extensive error reporting), to collect all the regular files within a directory structure, to safely copy all files into a new directory structure, and to safely mirror directories using `tar`.
73
+
74
+
`lib/diff` from #205 contains functions to log or edit differences between files and directory trees.
75
+
76
+
`lib/archive` from #211 contains the `@go.create_gzipped_tarball` convenience function to easily and safely create `.tar.gz` archive files.
77
+
78
+
### Project improvements
79
+
80
+
The project now contains a GitHub issue and pull request templates, a GitHub `CODEOWNERS` file, and an Appveyor build to ensure Windows compatibility. See:
*`stub_program_in_path` (#194): Now ensures that new stubs are passed to `hash`. Previously, if a command had already been invoked, Bash would remember its path, and ignore the new stub.
41
91
42
-
## Changes since v1.5.0
92
+
## Changes since v1.6.0
43
93
44
94
You can see the details of every change by issuing one or more of the following commands after cloning: https://github.com/mbland/go-script-bash
0 commit comments