Use bats.withLibraries instead of submodules
This commit is contained in:
parent
f4cdb276c3
commit
e9c8e3b35e
8 changed files with 16 additions and 20 deletions
9
.gitmodules
vendored
9
.gitmodules
vendored
|
|
@ -1,9 +0,0 @@
|
||||||
[submodule "test/test_helper/bats-support"]
|
|
||||||
path = test/test_helper/bats-support
|
|
||||||
url = https://github.com/bats-core/bats-support.git
|
|
||||||
[submodule "test/test_helper/bats-assert"]
|
|
||||||
path = test/test_helper/bats-assert
|
|
||||||
url = https://github.com/bats-core/bats-assert.git
|
|
||||||
[submodule "test/test_helper/bats-file"]
|
|
||||||
path = test/test_helper/bats-file
|
|
||||||
url = https://github.com/bats-core/bats-file.git
|
|
||||||
|
|
@ -16,7 +16,7 @@ You include a small bash script inside your commit messages, and `git-check-asse
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix build .?submodules=1
|
nix build .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples of commit messages
|
## Examples of commit messages
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,11 @@ resholve.mkDerivation {
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
shellcheck-minimal
|
shellcheck-minimal
|
||||||
bats
|
(bats.withLibraries (p: [
|
||||||
|
p.bats-assert
|
||||||
|
p.bats-support
|
||||||
|
p.bats-file
|
||||||
|
]))
|
||||||
gitMinimal
|
gitMinimal
|
||||||
shfmt
|
shfmt
|
||||||
];
|
];
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -16,9 +16,13 @@
|
||||||
{
|
{
|
||||||
packages.default = pkgs.callPackage ./default.nix { };
|
packages.default = pkgs.callPackage ./default.nix { };
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = [
|
||||||
bats
|
(pkgs.bats.withLibraries (p: [
|
||||||
shfmt
|
p.bats-assert
|
||||||
|
p.bats-support
|
||||||
|
p.bats-file
|
||||||
|
]))
|
||||||
|
pkgs.shfmt
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
setup() {
|
setup() {
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
load 'test_helper/bats-support/load'
|
bats_load_library bats-support
|
||||||
load 'test_helper/bats-assert/load'
|
bats_load_library bats-assert
|
||||||
load 'test_helper/bats-file/load'
|
bats_load_library bats-file
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")" >/dev/null 2>&1 && pwd)"
|
DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")" >/dev/null 2>&1 && pwd)"
|
||||||
PATH="$DIR/../bin:$PATH"
|
PATH="$DIR/../bin:$PATH"
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 697471b7a89d3ab38571f38c6c7c4b460d1f5e35
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 6bee58bec7c2f4aed1a7425ccd4bdc42b4a84599
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 0954abb9925cad550424cebca2b99255d4eabe96
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue