Skip to content

Commit

Permalink
Makefile: various fixes
Browse files Browse the repository at this point in the history
- explicitly configure shell
- change CONTAINER_RUNTIME error to warning
- fix broken GORELEASER_ARGS setup
  • Loading branch information
joelanford authored and grokspawn committed May 15, 2024
1 parent bd62a21 commit 19e1839
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Setting SHELL to bash allows bash commands to be executed by recipes.
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
SHELL := /usr/bin/env bash -o pipefail
.SHELLFLAGS := -ec

###########################
# Configuration Variables #
###########################
Expand Down Expand Up @@ -36,7 +41,7 @@ CONTAINER_RUNTIME := docker
else ifneq (, $(shell command -v podman 2>/dev/null))
CONTAINER_RUNTIME := podman
else
$(error Could not find docker or podman in path!)
$(warning Could not find docker or podman in path! This may result in targets requiring a container runtime failing!)
endif

# By default setup-envtest will write to $XDG_DATA_HOME, or $HOME/.local/share if that is not defined.
Expand Down Expand Up @@ -246,7 +251,7 @@ ENABLE_RELEASE_PIPELINE := false
endif
export ENABLE_RELEASE_PIPELINE

ifeq ($(origin release: GORELEASER_ARGS), undefined)
ifeq ($(origin GORELEASER_ARGS), undefined)
release: GORELEASER_ARGS := --snapshot --clean
endif
release: $(GORELEASER) ## Run goreleaser
Expand Down

0 comments on commit 19e1839

Please sign in to comment.