Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

| Version | License | Install | Release notes |
| --- | --- | --- | --- |
| `0.2.1` | [Apache-2.0](LICENSE) | `brew install codeforester/base/base-bash-libs` | [v0.2.1](https://github.com/codeforester/base-bash-libs/releases/tag/v0.2.1) |
| `0.2.1` | [Apache-2.0](LICENSE) | `brew install basefoundry/base/base-bash-libs` | [v0.2.1](https://github.com/basefoundry/base-bash-libs/releases/tag/v0.2.1) |

Reusable Bash libraries extracted from
[Base](https://github.com/codeforester/base).
[Base](https://github.com/basefoundry/base).

This repository provides sourceable Bash libraries for scripts that want
consistent logging, command execution, filesystem editing, Git helper behavior,
Expand Down Expand Up @@ -35,18 +35,18 @@ See [`lib/bash/README.md`](lib/bash/README.md) for the package layout.
Install the library package from the Base Homebrew tap:

```bash
brew trust codeforester/base
brew install codeforester/base/base-bash-libs
brew trust basefoundry/base
brew install basefoundry/base/base-bash-libs
```

The trust step is required on Homebrew versions that block formulae from
non-official taps until the tap is trusted. It is safe to run again on machines
that already trust `codeforester/base`.
that already trust `basefoundry/base`.

Source the installed stdlib from the Homebrew prefix:

```bash
base_bash_libs_prefix="$(brew --prefix codeforester/base/base-bash-libs)"
base_bash_libs_prefix="$(brew --prefix basefoundry/base/base-bash-libs)"
source "$base_bash_libs_prefix/libexec/lib/bash/std/lib_std.sh"
printf 'base-bash-libs version: %s\n' "$BASE_BASH_LIBS_VERSION"
```
Expand All @@ -65,7 +65,7 @@ Homebrew. Keep the repository layout intact so `lib_std.sh` can find the root
`VERSION` file:

```bash
git clone https://github.com/codeforester/base-bash-libs.git vendor/base-bash-libs
git clone https://github.com/basefoundry/base-bash-libs.git vendor/base-bash-libs
```

Source the stdlib from that checkout:
Expand Down Expand Up @@ -131,7 +131,7 @@ brew install bats-core shellcheck

## Base

This repository is managed by [Base](https://github.com/codeforester/base).
This repository is managed by [Base](https://github.com/basefoundry/base).
Base is useful for developing this repository, but it is not required to consume
the Bash libraries from Homebrew, a source checkout, a vendored copy, or a git
submodule.
Expand Down
2 changes: 1 addition & 1 deletion lib/bash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Reusable Bash libraries for command wrappers and other Bash tooling.
Common BATS helpers for Bash library test suites.

The Base runtime shell files and Base version helpers remain in
`codeforester/base`. This repository carries only sourceable reusable library
`basefoundry/base`. This repository carries only sourceable reusable library
modules.
6 changes: 6 additions & 0 deletions tests/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ if ! sed -n '1,30p' README.md | grep -F 'Requires Bash 4.2+' >/dev/null; then
exit 1
fi

stale_base_refs="$(grep -R -n -E 'codeforester/base|github.com/codeforester' README.md lib/bash/README.md || true)"
if [[ -n "$stale_base_refs" ]]; then
printf 'README files must not use stale codeforester Base coordinates:\n%s\n' "$stale_base_refs" >&2
exit 1
fi

fix_comments="$(grep -R -n '# FIX:' lib/bash || true)"
if [[ -n "$fix_comments" ]]; then
printf 'Production library files must not contain development # FIX: comments:\n%s\n' "$fix_comments" >&2
Expand Down
Loading