Move validate to a different file
This commit is contained in:
@@ -123,6 +123,7 @@
|
|||||||
(builtins.readFile ./.gitlab-ci-build.yml.in)
|
(builtins.readFile ./.gitlab-ci-build.yml.in)
|
||||||
);
|
);
|
||||||
cache = pkgs.callPackage (import ./nix/cache.nix) { inherit active distroFile; };
|
cache = pkgs.callPackage (import ./nix/cache.nix) { inherit active distroFile; };
|
||||||
|
validate = pkgs.callPackage (import ./nix/validate.nix) {};
|
||||||
cache-restore = pkgs.writeShellApplication {
|
cache-restore = pkgs.writeShellApplication {
|
||||||
name = "cache-restore";
|
name = "cache-restore";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
@@ -161,19 +162,6 @@
|
|||||||
shellcheck -e SC2239 "''${scripts[@]}"
|
shellcheck -e SC2239 "''${scripts[@]}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
validate = pkgs.writeShellApplication {
|
|
||||||
name = "validate";
|
|
||||||
runtimeInputs = with pkgs; [
|
|
||||||
packer
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
shopt -s globstar
|
|
||||||
packer init sources
|
|
||||||
for vars in distros/**/*.pkrvars.hcl; do
|
|
||||||
packer validate -except=upload "-var-file=''${vars}" sources/
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://numtide.github.io/treefmt/
|
# https://numtide.github.io/treefmt/
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
writeShellApplication,
|
||||||
|
packer,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
writeShellApplication {
|
||||||
|
name = "validate";
|
||||||
|
runtimeInputs = [
|
||||||
|
packer
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
shopt -s globstar
|
||||||
|
packer init sources
|
||||||
|
for vars in distros/**/*.pkrvars.hcl; do
|
||||||
|
packer validate -except=upload "-var-file=''${vars}" sources/
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user