Skip to content

Commit

Permalink
Merge branch 'main' into Tags
Browse files Browse the repository at this point in the history
  • Loading branch information
in-mai-space authored Mar 22, 2024
2 parents c715a23 + bbd33de commit 5ed4541
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 51 deletions.
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
- It requires you to add all the exports to path so read the end of the installation carefully!
- [Trunk](https://marketplace.visualstudio.com/items?itemName=Trunk.io) (Recommended!)
- Visual Studio Code extension for linting/formatting
- [Air](https://github.com/cosmtrek/air?tab=readme-ov-file#installation)
- Live reload for Go apps
- [gofumpt](https://github.com/mvdan/gofumpt)
- A stricter gofmt
- [golangci-lint](https://golangci-lint.run/welcome/install/)
Expand Down
43 changes: 0 additions & 43 deletions backend/.air.toml

This file was deleted.

16 changes: 10 additions & 6 deletions cli/commands/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ func BackendCommand() *cli.Command {
Category: "Development",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "use-dev-dot-env",
Usage: "Use the .env file in the backend directory",
Aliases: []string{"d"},
Name: "d",
Usage: "Use the .env.dev file in the backend directory",
},
},
Action: func(c *cli.Context) error {
err := RunBackend()
err := RunBackend(c.Bool("d"))
if err != nil {
return cli.Exit(err.Error(), 1)
}
Expand All @@ -34,8 +33,13 @@ func BackendCommand() *cli.Command {
return command
}

func RunBackend() error {
cmd := exec.Command("air")
func RunBackend(useDevDotEnv bool) error {
cmd := exec.Command("go", "run", "main.go")

if useDevDotEnv {
cmd.Args = append(cmd.Args, "--use-dev-dot-env")
}

cmd.Dir = BACKEND_SRC_DIR
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down

0 comments on commit 5ed4541

Please sign in to comment.