Skip to content

Commit

Permalink
chore: os-independent makefile to build werf target
Browse files Browse the repository at this point in the history
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Apr 27, 2022
1 parent d9ced42 commit eab4f2f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Makefile
@@ -1,12 +1,21 @@
.PHONY: all werf buildah-test fmt lint docs clean build-images

ifeq ($(OS),Windows_NT)
uname_S := Windows
else
uname_S := $(shell uname -s)
endif

all: werf

ifeq ($(uname_S), Linux)
werf:
CGO_ENABLED=1 go install -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" github.com/werf/werf/cmd/werf
else
werf:
CGO_ENABLED=0 go install -tags="dfrunmount dfssh containers_image_openpgp" "github.com/werf/werf/cmd/werf"
endif

buildah-werf:
CGO_ENABLED=1 go install -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" github.com/werf/werf/cmd/werf

buildah-test:
CGO_ENABLED=1 go install -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" github.com/werf/werf/cmd/buildah-test
Expand Down

0 comments on commit eab4f2f

Please sign in to comment.