#Go task library
1 messages · Page 1 of 1 (latest)
I’m hoping to add dagger magic in soon to some of mine. I have github.com/sheldonhull/magetools that use. I added Go build and angular build mage tasks to my notes section here but not haven’t had time to add anything to the other repo. https://notes.sheldonhull.com/development/go/dagger/
ohh, nice, pterm, didnt know about that one 🙌 thanks for sharing
one question, does reassigning the npm var have any affect here instead of chaining withExex?
npm = npm.WithExec([]string{"npm", "install", "-g", fmt.Sprintf("@angular/cli@%s", AngularVersion)})
npm = npm.WithExec([]string{"ng", "config", "-g", "cli.warnings.versionMismatch", "false"})
npm = npm.WithExec([]string{"ng", "v"})
npm = npm.WithExec([]string{"npm", "ci"})
npm = npm.WithExec([]string{"ng", "build", "--configuration", "production"})
shouldn't, it's exactly the same
Good point though. Used to go idioms and chaining methods is typically an anti pattern. Dagger is different so i don’t think I even mentally registered I could just chain. No error handling anyway since that’s all just building the DAG right? Cleaner to chain if that’s the case.