Skip to content

Commit

Permalink
fix(jzero): fix #149 (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie authored Dec 18, 2024
1 parent d5a2fd6 commit 62741df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .template/frame/api/app/.jzero.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gen:
{{ if or (has "serverless" .Features) (has "serverless_core" .Features) }}before:
- gorename {{ .Module }}/server {{ .Module }}/internal{{ end }}
after:
{{ if has "serverless" .Features }}- gorename {{ .Module }}/internal {{ .Module }}/server{{ end }}
{{ if or (has "serverless" .Features) (has "serverless_core" .Features) }}- gorename {{ .Module }}/internal {{ .Module }}/server{{ end }}
- jzero gen swagger

split-api-types-dir: true
7 changes: 1 addition & 6 deletions cmd/serverless.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ Copyright © 2024 jaronnie <[email protected]>
package cmd

import (
"os"
"path/filepath"

"github.com/spf13/cobra"

"github.com/jzero-io/jzero/config"
Expand Down Expand Up @@ -59,14 +56,12 @@ var serverlessDeleteCmd = &cobra.Command{
}

func init() {
wd, _ := os.Getwd()

rootCmd.AddCommand(serverlessCmd)
serverlessCmd.AddCommand(serverlessBuildCmd)
serverlessCmd.AddCommand(serverlessDeleteCmd)
serverlessCmd.AddCommand(serverlessNewCmd)

serverlessCmd.PersistentFlags().StringP("home", "", filepath.Join(wd, ".template"), "set templates path")
serverlessCmd.PersistentFlags().StringP("home", "", "", "set templates path")
serverlessNewCmd.Flags().BoolP("core", "", false, "is core serverless")
serverlessNewCmd.Flags().StringP("module", "m", "", "set go module")
serverlessNewCmd.Flags().StringP("remote", "r", "https://github.com/jzero-io/templates", "remote templates repo")
Expand Down

0 comments on commit 62741df

Please sign in to comment.