Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
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.
./go script: a unified development environment interface
./go script aims to abstract away many of the steps needed to develop (and sometimes deploy) a software project. It is a replacement for READMEs and other documents that may become out-of-date, and when maintained properly, should provide a cohesive and discoverable interface for common project tasks.
This software is made available as Open Source software under the ISC License. If you'd care to contribute to this project, be it code fixes, documentation updates, or new features, please read the
What's new in this release
All of the issues and pull requests for this release are visible in the v1.7.0 milestone.
./go null command verifies that the framework is installed and functioning properly (#190).
New test helpers
There are a few powerful new test helper functions:
create_forwarding_script(#192, #195): Used to create a wrapper in
BATS_TEST_BINDIRto make a system program accessible while restricting
restore_programs_in_path(#196): Allows a single call to remove multiple command stub scripts.
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.
run_bats_test_suite(#196): A specialized version of
run_test_scriptspecifically for generating and running Bats test cases.
run_bats_test_suite_in_isolation(#196): An even more specialized version of
run_bats_test_suiteto ensure that
PATHis restricted to
BATS_TEST_BINDIRand the Bats
libexec/directory within the suite.
lib/bats/background-process(#197): Helpers for managing and validating background processes.
skip_if_none_present_on_system(#198): Skips a test if none of the specified system programs are available.
_GO_PLATFORM vars and
./go goinfo command
lib/platform module introduced in #200 provides an interface to detect on which system the script is running. Is parses /etc/os-release if it's available; otherwise uses
uname -r, and
sw_vers -productVersion (on macOS).
./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:
$ ./go goinfo _GO_CORE_VERSION: v1.7.0 BASH_VERSION: 4.4.12(1)-release OSTYPE: darwin16.3.0 _GO_PLATFORM_ID: macos _GO_PLATFORM_VERSION_ID: 10.13
File system processing modules
Introduced in #201,
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.
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
lib/diff from #205 contains functions to log or edit differences between files and directory trees.
lib/archive from #211 contains the
@go.create_gzipped_tarball convenience function to easily and safely create
.tar.gz archive files.
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.
Changes since v1.6.0
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
$ ./go changes v1.6.0 v1.7.0 $ gitk v1.6.0..v1.7.0