Browse Source

add make cli command

Alexander Belanger 4 năm trước cách đây
mục cha
commit
52c9022b43
2 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 1 0
      .gitignore
  2. 5 0
      Makefile

+ 1 - 0
.gitignore

@@ -13,6 +13,7 @@ gon*.hcl
 staging.sh
 *.crt
 *.key
+bin
 
 # Local .terraform directories
 **/.terraform/*

+ 5 - 0
Makefile

@@ -1,3 +1,6 @@
+BINDIR      := $(CURDIR)/bin
+VERSION ?= dev
+
 start-dev: install setup-env-files
 	bash ./scripts/dev-environment/StartDevServer.sh
 
@@ -7,3 +10,5 @@ install:
 setup-env-files: 
 	bash ./scripts/dev-environment/CreateDefaultEnvFiles.sh
 
+build-cli: 
+	go build -ldflags="-w -s -X 'github.com/porter-dev/porter/cli/cmd.Version=${VERSION}'" -a -tags cli -o $(BINDIR)/porter ./cli