Properly evaluate ldflags and tags, include sha256 output
@@ -77,18 +77,20 @@ cross: $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(pla
$(BUILD_DIR)/$(PROJECT)-%: $(STATIK_FILES) $(GO_FILES) $(BUILD_DIR) deploy/cross/Dockerfile
$(eval os = $(firstword $(subst -, ,$*)))
$(eval arch = $(lastword $(subst -, ,$(subst .exe,,$*))))
+ $(eval ldflags = $(GO_LDFLAGS_$(os)))
+ $(eval tags = $(GO_BUILD_TAGS_$(os)))
docker build \
--build-arg GOOS=$(os) \
--build-arg GOARCH=$(arch) \
- --build-arg TAGS=$(GO_BUILD_TAGS_$(os)) \
- --build-arg LDFLAGS=$(GO_LDFLAGS_$(arch)) \
+ --build-arg TAGS=$(tags) \
+ --build-arg LDFLAGS=$(ldflags) \
-f deploy/cross/Dockerfile \
-t skaffold/cross \
.
docker run --rm skaffold/cross cat /build/skaffold > $@
- shasum -a 256 $@ > $@.sha256
+ shasum -a 256 $@ | tee $@.sha256
file $@
.PHONY: $(BUILD_DIR)/VERSION
