Initial commit. Adding the Makefile and hello world code
This commit is contained in:
parent
53ae0ba4e5
commit
82289b5041
31
app/server/src/Makefile
Normal file
31
app/server/src/Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Go parameters
|
||||
GOCMD=go
|
||||
GOBUILD=$(GOCMD) build
|
||||
GOCLEAN=$(GOCMD) clean
|
||||
GOTEST=$(GOCMD) test
|
||||
GOGET=$(GOCMD) get
|
||||
BINARY_NAME=internal-tools-server
|
||||
BINARY_UNIX=$(BINARY_NAME)_unix
|
||||
|
||||
all: test build
|
||||
build:
|
||||
$(GOBUILD) -o $(BINARY_NAME) -v
|
||||
test:
|
||||
$(GOTEST) -v ./...
|
||||
clean:
|
||||
$(GOCLEAN)
|
||||
rm -f $(BINARY_NAME)
|
||||
rm -f $(BINARY_UNIX)
|
||||
run:
|
||||
$(GOBUILD) -o $(BINARY_NAME) -v ./...
|
||||
./$(BINARY_NAME)
|
||||
deps:
|
||||
$(GOGET) github.com/markbates/goth
|
||||
$(GOGET) github.com/markbates/pop
|
||||
|
||||
|
||||
# Cross compilation
|
||||
build-linux:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_UNIX) -v
|
||||
docker-build:
|
||||
docker run --rm -it -v "$(GOPATH)":/go -w /go/src/bitbucket.org/rsohlich/makepost golang:latest go build -o "$(BINARY_UNIX)" -v
|
||||
7
app/server/src/server.go
Normal file
7
app/server/src/server.go
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Printf("hello, world\n")
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user