-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 888 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 888 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
all: dep build
./fn
build:
go build -o fn
generate-oci-parity:
@if [ -z "$(SPEC)" ]; then echo "SPEC is required. Usage: make generate-oci-parity SPEC=/absolute/path/to/functions-api-spec.yaml"; exit 1; fi
go run ./tools/oci_parity_gen --spec "$(SPEC)"
install:
go build -o ${GOPATH}/bin/fn
docker:
docker build -t fnproject/fn:latest .
dep:
GO111MODULE=on GOFLAGS=-mod=vendor go mod vendor -v
test: build
./test.sh
release:
GOOS=linux go build -o fn_linux
GOOS=darwin go build -o fn_mac
GOOS=windows go build -o fn.exe
# Uses fnproject/go:x.x-dev because golang:alpine has this issue: https://github.com/docker-library/golang/issues/155 and this https://github.com/docker-library/golang/issues/153
docker run --rm -v ${PWD}:/go/src/github.com/fnproject/cli -w /go/src/github.com/fnproject/cli fnproject/go:1.23-dev go build -o fn_alpine
.PHONY: install test build