-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·44 lines (32 loc) · 911 Bytes
/
Makefile
File metadata and controls
executable file
·44 lines (32 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Makefile for building and managing the xsh application
PROJECT = bin/xsh
# Version of the appliction
VERSION = dev
build-mac:
@echo "Building the app for mac OS"
mkdir -p bin/
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w -X 'xsh/cmd.Version=${VERSION}'" -o ${PROJECT}-mac
build-linux:
@echo "Building the app for linux OS"
mkdir -p bin/
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -extldflags '-static' -X 'xsh/cmd.Version=${VERSION}'" -o ${PROJECT}-linux
build: build-mac build-linux
@echo "Builing for mac and linux arch"
clean:
# Remove the binaries directory
rm -rf ./bin/*
lint:
@echo "Running Golang Lint..."
golangci-lint run
test:
@echo "Running Unit tests"
go test ./... -run=.
verify: test lint
@echo "Code verification passed"
gendocs:
@echo "Generating documentation"
go run ./... gendocs
put-host:
go run ./... put h -i
get-hosts:
go run ./... get h