create_makefile

package
v0.105.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "create-makefile",
	Short: "Create Makefile with optional include of Makefile.local.mk and commit it",
	Args:  cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		if _, err := os.Stat("Makefile"); err == nil {
			log.Fatalln("Makefile already exists")
		}
		err := os.WriteFile("Makefile", []byte("-include Makefile.local.mk\n"), 0644)
		if err != nil {
			log.Fatalln(err)
		}
		exec_utils.ExecOut("git", "add", "Makefile")
		exec_utils.ExecOut(
			"git", "commit", "-n", "-m",
			"feat(Makefile): Create Makefile with optional include of Makefile.local.mk (gitignored)")
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL