mirror of
https://github.com/Valkyrie00/bold-brew.git
synced 2026-03-14 14:25:53 +01:00
added Makefile
This commit is contained in:
parent
aea483ade3
commit
1a08c60b5c
2 changed files with 38 additions and 0 deletions
7
.env
Normal file
7
.env
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
APP_NAME=bbrew
|
||||
APP_VERSION=0.0.1-local
|
||||
|
||||
### BUILD DEV ENVIRONMENT
|
||||
BUILD_GOVERSION=1.20
|
||||
BUILD_GOOS=darwin
|
||||
BUILD_GOARCH=arm64
|
||||
31
Makefile
Normal file
31
Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
##############################
|
||||
# VARIABLES
|
||||
##############################
|
||||
ifneq (,$(wildcard ./.env))
|
||||
include .env
|
||||
export
|
||||
endif
|
||||
%:@
|
||||
|
||||
##############################
|
||||
# RELEASE
|
||||
##############################
|
||||
.PHONY: release-snapshot
|
||||
release-snapshot:
|
||||
goreleaser release --snapshot --clean
|
||||
|
||||
.PHONY: build-snapshot
|
||||
build-snapshot:
|
||||
goreleaser build --snapshot --clean
|
||||
|
||||
##############################
|
||||
# BUILD
|
||||
##############################
|
||||
.PHONY: build
|
||||
build:
|
||||
@docker run --rm -v $(PWD):/app -w /app golang:$(BUILD_GOVERSION) \
|
||||
env GOOS=$(BUILD_GOOS) GOARCH=$(BUILD_GOARCH) go build -o $(APP_NAME) ./cmd/$(APP_NAME)
|
||||
|
||||
.PHONY: run
|
||||
run: build
|
||||
./$(APP_NAME)
|
||||
Loading…
Add table
Add a link
Reference in a new issue