Skip to content

Commit

Permalink
clean up makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
amartin120 committed Jan 29, 2024
1 parent e8d0848 commit 27acb23
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
SHELL:=/bin/bash
BUILD_OS=darwin
BUILD_ARCH=arm64
GO_FILES=$(shell go list ./... | grep -v /vendor/)

COSIGN_VERSION=v2.2.2+carbide.2

BUILD_VERSION=$(shell cat VERSION)
BUILD_TAG=$(BUILD_VERSION)

.SILENT:

all: fmt vet install test

build:
rm -rf cmd/hauler/binaries;\
mkdir -p cmd/hauler/binaries;\
wget -P cmd/hauler/binaries/ https://github.com/rancher-government-carbide/cosign/releases/download/$(COSIGN_VERSION)/cosign-$(BUILD_OS)-$(BUILD_ARCH);\
wget -P cmd/hauler/binaries/ https://github.com/rancher-government-carbide/cosign/releases/download/$(COSIGN_VERSION)/cosign-$(shell go env GOOS)-$(shell go env GOARCH);\
mkdir bin;\
GOENV=GOARCH=$(BUILD_ARCH) CGO_ENABLED=0 go build -o bin ./cmd/...;\
CGO_ENABLED=0 go build -o bin ./cmd/...;\

build-all: fmt vet
goreleaser build --rm-dist --snapshot

install:
rm -rf cmd/hauler/binaries;\
mkdir -p cmd/hauler/binaries;\
wget -P cmd/hauler/binaries/ https://github.com/rancher-government-carbide/cosign/releases/download/$(COSIGN_VERSION)/cosign-$(BUILD_OS)-$(BUILD_ARCH);\
GOENV=GOARCH=$(BUILD_ARCH) CGO_ENABLED=0 go install ./cmd/...;\
wget -P cmd/hauler/binaries/ https://github.com/rancher-government-carbide/cosign/releases/download/$(COSIGN_VERSION)/cosign-$(shell go env GOOS)-$(shell go env GOARCH);\
CGO_ENABLED=0 go install ./cmd/...;\

vet:
go vet $(GO_FILES)
Expand Down

0 comments on commit 27acb23

Please sign in to comment.