mirror of
				https://github.com/KevinMidboe/planetposen-mail.git
				synced 2025-10-29 17:50:32 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			771 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			771 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
.PHONY: build install server
 | 
						|
 | 
						|
PROJECT_NAME=$(shell basename $(CURDIR))
 | 
						|
 | 
						|
## build: build the application
 | 
						|
build:
 | 
						|
	export GO111MODULE="on"; \
 | 
						|
	go mod download; \
 | 
						|
	go mod vendor; \
 | 
						|
	CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o main cmd/server/main.go
 | 
						|
 | 
						|
## install: fetches go modules
 | 
						|
install:
 | 
						|
	export GO111MODULE="on"; \
 | 
						|
	go mod tidy; \
 | 
						|
	go mod download \
 | 
						|
 | 
						|
## server: runs the server with -race
 | 
						|
server:
 | 
						|
	export GO111MODULE="on"; \
 | 
						|
	go run -race cmd/server/main.go
 | 
						|
 | 
						|
## preview: runs preview of mail template
 | 
						|
preview:
 | 
						|
	export GO111MODULE="on"; \
 | 
						|
        go run cmd/preview/main.go
 | 
						|
 | 
						|
## modd: Monitors the directory, and recompiles your app every time a file changes. Also runs tests.
 | 
						|
## (To install modd, run: go get github.com/cortesi/modd/cmd/modd)
 | 
						|
modd:
 | 
						|
	modd
 |