netlify: Europa port

- Fix netlify.#Deploy (there's still FIXMEs)
- Externalize the `deploy.sh` script
- Add tests
- Misc engine fixes for more explicit error messages

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2022-01-19 17:19:37 -08:00
parent 7cd17c39bc
commit 5016cf5e30
14 changed files with 243 additions and 99 deletions

View File

@@ -77,6 +77,10 @@ func (c *fsContext) FromValue(v *compiler.Value) (*FS, error) {
c.l.RLock()
defer c.l.RUnlock()
if !v.LookupPath(fsIDPath).IsConcrete() {
return nil, fmt.Errorf("invalid FS at path %q: FS is not set", v.Path())
}
// This is #Scratch, so we'll return an empty FS
if v.LookupPath(fsIDPath).Kind() == cue.NullKind {
return &FS{}, nil