Move validate to a different file

This commit is contained in:
Greg Hellings
2024-07-13 01:39:48 -05:00
parent f74011333b
commit 7c956c9d33
2 changed files with 19 additions and 13 deletions
+18
View File
@@ -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
'';
}