Adjusted git clone commands in Dockerfiles to use `--depth=1`. This
optimizes the cloning process by fetching a limited history, thereby
saving resources and time.
* MODIFY: Declare and assign separately to avoid masking return values
For Shellcheck SC2155
* DELETE: Unused variables
* MODIFY: Double quote to prevent globbing and word splitting
Addresses SC2086
* DELETE: Remove unused variable
Addresses SC2034
* MODIFY: Remove use of expr
Addresses SC2003 and SC2004
* Remove spaces around COLOR options
Thanks to @cclaus
https://github.com/kdabir/has/pull/75#discussion_r1301313069
Co-authored-by: Christian Clauss <cclauss@me.com>
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Resolve whether decoration (color) is needed based on flags --color_{auto,never,always} (auto is default).
If --color_auto is passed, text decoration will ocurr only to the stdout.
If --color_{never,always} is passed, will or will not occur in any case.
* change references
* Fix containers (#47)
* spelling
* remove extra xz install
* more references
* more stable strategy for installing node, npm
* more flexible version pinning for alpine
* syntax
Co-authored-by: Stephen Dolenc <sdolenc@users.noreply.github.com>
* ✅🎨 follow Bats coding style for tests
- [x] renamed working directory variable to `HAS_TMPDIR`
- [x] explicitly calling has binary
- [x] Only using `[[ ]]` for regex matches
* ✨ add coreutils and archiving utilities to known commands
- [x] command mapping `*coreutils` to `gnu_coreutils`
- [x] ✅ add test for gnu_coreutils
- [x] 💚 add archiving packages to travis
- [x] ✅ add test for archiving commands
* ✨ add utilities `hub` and `zip`
- [x] add custom processing for `hub` and `zip`
- [x] ✅ add tests for `hub` and `zip`
* adding restyled.io 🔧 config
* ✨ add dynamic `-V` check
- [x] 👌 update 'ab' to use dynamic `-V`
- [x] 👌 update 'go' to use dynamic `arg version`
- [x] 🚨 general whitespace and whitespace in command subsitution
- [x] [SC2004] 🚨 `$`/`${}` is unnecessary on arithmetic variables.
- [x] ✅ make `hub` test conditional on command found
* [SC2196] Use grep -Eegrep is non-standard and deprecated.
* [SC2086] Double quoting
Double quote to prevent globbing and word splitting.
* [SC2059] printf syntax
Don't use variables in the printf format string.
Use printf "..%s.." "$foo".
Update matching test to not assume whitespace is <space>
* [SC2002] Useless cat.
Consider 'cmd < file | ..' or 'cmd file | ..' instead.
* Update Unicode PASS/FAIL output
- [x] NEW variables for 'checkmark' and 'fancy x' and tput colours
- [x] eg: `checkmark` = `\342\234\223`
- [x] eg: `PASS=${txtbold}${txtgreen}${checkmark}${txtreset}`
- [x] update `printf` statements to use `%b` for unicode variables.
- [x] Using readonly variables for
- [x] $BINARY_NAME and $VERSION
- [x] $PASS and $FAIL
- [x] refactor `.hasrc` file reading
- [x] [SC2002] Useless cat
- [x] Add new BATS tests for Unicode output
* Repo scaffolding - shellscript filetype
- [x] Add shellscripts to `.editorconfig`
- [x] Add shellscripts to `.gitattributes`
* Refactored tests to use consistent unicode glyphs.
Details:
* Freshen Makefile and update README.md
- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output
- [x] Use `install` with permission mode
The permissions on `has` were 777 from `git clone`.
- [x] Add option to use $PREFIX
What if I don't want to install to /usr/local/bin?
`make PREFIX=$HOME/.local install` now works.
- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets
* Freshen Makefile and update README.md
- [x] Add `sudo` to revelvant commands
- [x] Use named languages (bash) in fenced codeblocks
- [x] Use `console` in fenced codeblocks for command output
- [x] Use `install` with permissions set
The permissions on `has` were 777 from `git clone`.
- [x] Add option to use $PREFIX
What if I don't want to install to /usr/local/bin?
`make PREFIX=$HOME/.local install` now works.
- [x] Add `update` target for `git pull`
- [x] Include .PHONY targets
- [x] Add tests for Makefile changes
- [x] Uses `bats` variables for directories
- ✓ make install creates a valid installation
- ✓ ..even if has is missing from directory
- ✓ make update runs git pull
* Update .hastest.bats
temp remove "git pull" check.
* Update travis to use bats-core 1.10
Do not be concerned about dirty working tree when running make update.
* Change version output to non-blinking.
* Update travis to use bats-core 1.10
Do not be concerned about dirty working tree when running make update.
* Working makefile
* Use `[[` and `@` for the $lines match.
* `make install` MacOS friendly again