project: add dagger.lock to gitignore when pulling an external dep

Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
Sam Alba 2021-11-17 16:25:49 -08:00
parent 9669d5fce8
commit 6ef5f52db5

View File

@ -387,10 +387,10 @@ func vendorUniverse(ctx context.Context, p string) error {
return err
}
// add universe to `.gitignore`
// add universe and lock file to `.gitignore`
if err := os.WriteFile(
path.Join(p, "cue.mod", "pkg", ".gitignore"),
[]byte(fmt.Sprintf("# dagger universe\n%s\n", stdlib.PackageName)),
[]byte(fmt.Sprintf("# generated by dagger\n%s\ndagger.lock\n", stdlib.PackageName)),
0600,
); err != nil {
return err