mirror of
https://github.com/dhall-lang/dhall-kubernetes.git
synced 2024-11-03 21:05:47 +03:00
Fix CI to check that generation script has run (#145)
… 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
efb745854a
@ -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
|
||||||
|
@ -12,7 +12,9 @@ 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" ]
|
||||||
|
// builtins.removeAttrs pkgs.dhall-kubernetes-tests
|
||||||
|
[ "override-test" "overrideDerivation-test" ];
|
||||||
|
|
||||||
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