Forráskód Böngészése

changes on makefile

luis 6 éve
szülő
commit
902cac08a2
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 2 2
      .boiler/config.yml
  2. 3 3
      go/Makefile.boiler

+ 2 - 2
.boiler/config.yml

@@ -3,9 +3,9 @@ vars:
   - {name: binary, default: '{{.projName}}'}
   - {name: author}
   - {name: email}
-  - {name: maingo, default: '{{.projName}}/cmd/{{.binary}}', question: 'Main Package'}
+  - {name: mainpkg, default: '{{.projName|ToLower}}/cmd/{{.binary|ToLower}}', question: 'Main Package'}
 files:
-  - {source: 'gomain.go.boiler', target: 'go/src/{{.projName}}/cmd/{{.binary}}/main.go'}
+  - {source: 'gomain.go.boiler', target: 'go/src/{{.projName|ToLower}}/cmd/{{.binary|ToLower}}/main.go'}
 generators:
  gofile:
     aliases: [.go]

+ 3 - 3
go/Makefile.boiler

@@ -11,8 +11,8 @@ GETENV=
 # What packages to build
 
 # CLI Packages
-CLI={{.maingo}}
-BIN=$(addprefix $(DIST)/, $(notdir $(CLI)))
+CLI={{.mainpkg}}
+BIN=$(addprefix $(DIST)/, {{.binary}})
 
 # Windows build
 ifeq ($(GOOS),windows)
@@ -26,7 +26,7 @@ all: $(BIN) deps
 	@$(ENV) echo -e "\e[32;01mBuilt for OS: `go env GOOS`, ARCH: `go env GOARCH`\e[0m"
 	
 $(BIN): deps
-	$(BUILDENV) GOPATH="$(GOPATH)" go build -o $@ $(CLI)
+	$(BUILDENV) GOPATH="$(GOPATH)" go build -o $(BIN) $(CLI)
 
 # generate
 generate: