mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-10 23:15:30 +03:00
parent
4fec2167a8
commit
11a986ae11
11
README.md
11
README.md
@ -274,8 +274,15 @@ metadata:
|
||||
### Tests
|
||||
|
||||
All tests are defined in `release.nix`. We run these tests in CI in a [Hydra
|
||||
project][hydra-project]. You can run the tests locally with `nix build --no-link
|
||||
release.nix`.
|
||||
project][hydra-project].
|
||||
|
||||
You can run the tests locally with the following somewhat magic command:
|
||||
```bash
|
||||
nix-build --no-link -E 'with import <nixpkgs> {}; callPackage ./release.nix { src.rev = ""; }'
|
||||
```
|
||||
|
||||
It is so because `release.nix` expects Hydra to provide the git revision in `src.rev`,
|
||||
but locally we don't have/want that, so we just call the function with an empty string.
|
||||
|
||||
### Changing the README
|
||||
|
||||
|
@ -90,8 +90,15 @@ ${../examples/out/ingress.yaml as Text}
|
||||
### Tests
|
||||
|
||||
All tests are defined in `release.nix`. We run these tests in CI in a [Hydra
|
||||
project][hydra-project]. You can run the tests locally with `nix build --no-link
|
||||
release.nix`.
|
||||
project][hydra-project].
|
||||
|
||||
You can run the tests locally with the following somewhat magic command:
|
||||
```bash
|
||||
nix-build --no-link -E 'with import <nixpkgs> {}; callPackage ./release.nix { src.rev = ""; }'
|
||||
```
|
||||
|
||||
It is so because `release.nix` expects Hydra to provide the git revision in `src.rev`,
|
||||
but locally we don't have/want that, so we just call the function with an empty string.
|
||||
|
||||
### Changing the README
|
||||
|
||||
|
10
release.nix
10
release.nix
@ -1,3 +1,4 @@
|
||||
{ src, ... }:
|
||||
let
|
||||
pkgs = import ./nixpkgs.nix;
|
||||
|
||||
@ -43,6 +44,14 @@ let
|
||||
LC_ALL=en_US.UTF-8 ./scripts/build-examples.py $out
|
||||
'';
|
||||
|
||||
# Derivation that trivially depends on the input source code revision.
|
||||
# As this is included in the "dhall-lang" aggregate, it forces every
|
||||
# commit to have a corresponding GitHub status check, even if the
|
||||
# commit doesn't make any changes (which can happen when merging
|
||||
# master in).
|
||||
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
|
||||
|
||||
|
||||
in {
|
||||
dhall-kubernetes = pkgs.releaseTools.aggregate {
|
||||
name = "dhall-kubernetes";
|
||||
@ -50,6 +59,7 @@ in {
|
||||
generatedFilesCompile
|
||||
validateExamples
|
||||
buildReadme
|
||||
rev
|
||||
];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user