mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-09-10 23:15:30 +03:00
Fix CI to check that generation script has run
… based on the discussion in #138 CI wasn't checking that the `./scripts/generate.sh` script had been run, which this change fixes
This commit is contained in:
parent
ad3369f9f9
commit
d4272b6b43
@ -88,7 +88,7 @@ let
|
|||||||
in
|
in
|
||||||
''echo './${inputFile} → ./${outputFile}'
|
''echo './${inputFile} → ./${outputFile}'
|
||||||
${pkgsNew.dhall-json}/bin/dhall-to-yaml --file $out/${inputFile} > $out/${outputFile}
|
${pkgsNew.dhall-json}/bin/dhall-to-yaml --file $out/${inputFile} > $out/${outputFile}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgsNew.runCommand "package-${drv.name}" { XDG_CACHE_HOME="."; } ''
|
pkgsNew.runCommand "package-${drv.name}" { XDG_CACHE_HOME="."; } ''
|
||||||
@ -106,15 +106,40 @@ let
|
|||||||
outputFile = "README.md";
|
outputFile = "README.md";
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgsNew.lib.optionalString (version == preferredVersion)
|
if (version == preferredVersion)
|
||||||
''echo './${inputFile} → ./${outputFile}'
|
then
|
||||||
${pkgsNew.dhall}/bin/dhall text --file $out/${inputFile} | ${pkgsNew.gnused}/bin/sed 's_\.\./package.dhall_https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/package.dhall_g' > $out/${outputFile}
|
''echo './${inputFile} → ./${outputFile}'
|
||||||
''
|
|
||||||
|
${pkgsNew.dhall}/bin/dhall text --file $out/${inputFile} | ${pkgsNew.gnused}/bin/sed 's_\.\./package.dhall_https://raw.githubusercontent.com/dhall-lang/dhall-kubernetes/master/package.dhall_g' > $out/${outputFile}
|
||||||
|
''
|
||||||
|
else
|
||||||
|
''
|
||||||
|
${pkgsNew.coreutils}/bin/rm --recursive $out/examples
|
||||||
|
''
|
||||||
}
|
}
|
||||||
|
${pkgsNew.coreutils}/bin/rm --recursive $out/docs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dhall-kubernetes = pkgsNew.callPackage ./dhall-kubernetes.nix {};
|
dhall-kubernetes = pkgsNew.callPackage ./dhall-kubernetes.nix {};
|
||||||
|
|
||||||
|
dhall-kubernetes-tests =
|
||||||
|
let
|
||||||
|
process = version: derivation: {
|
||||||
|
name = "${version}-test";
|
||||||
|
value =
|
||||||
|
pkgsNew.runCommand "test-dhall-kubernetes-${version}" {} ''
|
||||||
|
${pkgsNew.rsync}/bin/rsync --archive ${derivation}/ ./${version}.expected
|
||||||
|
${pkgsNew.rsync}/bin/rsync --archive ${../. + "/${version}"}/ ./${version}.actual
|
||||||
|
|
||||||
|
${pkgsNew.diffutils}/bin/diff --recursive ./${version}.{actual,expected}
|
||||||
|
|
||||||
|
touch $out
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
pkgsNew.lib.mapAttrs' process pkgsNew.dhall-kubernetes;
|
||||||
|
|
||||||
haskellPackages = pkgsOld.haskellPackages.override (old: {
|
haskellPackages = pkgsOld.haskellPackages.override (old: {
|
||||||
overrides =
|
overrides =
|
||||||
let
|
let
|
||||||
@ -123,14 +148,7 @@ let
|
|||||||
extension = haskellPackagesNew: haskellPackagesOld: {
|
extension = haskellPackagesNew: haskellPackagesOld: {
|
||||||
dhall-openapi =
|
dhall-openapi =
|
||||||
let
|
let
|
||||||
json =
|
dhall-haskell = ~/proj/dhall-haskell;
|
||||||
builtins.fromJSON (builtins.readFile ./dhall-haskell.json);
|
|
||||||
|
|
||||||
dhall-haskell = pkgsNew.fetchFromGitHub {
|
|
||||||
owner = "dhall-lang";
|
|
||||||
repo = "dhall-haskell";
|
|
||||||
inherit (json) rev sha256 fetchSubmodules;
|
|
||||||
};
|
|
||||||
|
|
||||||
in
|
in
|
||||||
(import "${dhall-haskell}/default.nix").dhall-openapi;
|
(import "${dhall-haskell}/default.nix").dhall-openapi;
|
||||||
|
@ -12,7 +12,8 @@ let
|
|||||||
# master in).
|
# master in).
|
||||||
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
|
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
|
||||||
} // builtins.removeAttrs pkgs.dhall-kubernetes
|
} // builtins.removeAttrs pkgs.dhall-kubernetes
|
||||||
[ "override" "overrideDerivation" ];
|
[ "override" "overrideDerivation" ]
|
||||||
|
// pkgs.dhall-kubernetes-tests;
|
||||||
|
|
||||||
dhall-kubernetes = pkgs.releaseTools.aggregate {
|
dhall-kubernetes = pkgs.releaseTools.aggregate {
|
||||||
name = "dhall-kubernetes-aggregate";
|
name = "dhall-kubernetes-aggregate";
|
||||||
|
Loading…
Reference in New Issue
Block a user