-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up Makefile and fix goreleaser deprecation
- Loading branch information
Showing
7 changed files
with
5 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ Q=$(if $V,,@) | |
PREFIX?= | ||
SRC=$(shell find . -type f -name '*.go' -not -path "./vendor/*") | ||
GOOS_OVERRIDE ?= | ||
OUTPUT_ROOT=output/ | ||
RELEASE=./.releases | ||
|
||
all: lint test build | ||
|
||
|
@@ -23,24 +21,17 @@ bootstra%: | |
$Q curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin latest | ||
$Q go install golang.org/x/vuln/cmd/govulncheck@latest | ||
$Q go install gotest.tools/gotestsum@latest | ||
$Q go install github.com/goreleaser/goreleaser@latest | ||
$Q go install github.com/sigstore/cosign/v2/cmd/cosign@latest | ||
|
||
.PHONY: bootstra% | ||
|
||
################################################# | ||
# Determine the type of `push` and `version` | ||
################################################# | ||
|
||
# If TRAVIS_TAG is set then we know this ref has been tagged. | ||
ifdef TRAVIS_TAG | ||
VERSION ?= $(TRAVIS_TAG) | ||
NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) | ||
ifeq ($(NOT_RC),) | ||
PUSHTYPE := release-candidate | ||
else | ||
PUSHTYPE := release | ||
endif | ||
# GITHUB Actions | ||
else ifdef GITHUB_REF | ||
ifdef GITHUB_REF | ||
VERSION ?= $(shell echo $(GITHUB_REF) | sed 's/^refs\/tags\///') | ||
NOT_RC := $(shell echo $(VERSION) | grep -v -e -rc) | ||
ifeq ($(NOT_RC),) | ||
|
@@ -53,21 +44,14 @@ VERSION ?= $(shell [ -d .git ] && git describe --tags --always --dirty="-dev") | |
# If we are not in an active git dir then try reading the version from .VERSION. | ||
# .VERSION contains a slug populated by `git archive`. | ||
VERSION := $(or $(VERSION),$(shell ./.version.sh .VERSION)) | ||
ifeq ($(TRAVIS_BRANCH),master) | ||
PUSHTYPE := master | ||
else | ||
PUSHTYPE := branch | ||
endif | ||
endif | ||
|
||
VERSION := $(shell echo $(VERSION) | sed 's/^v//') | ||
DEB_VERSION := $(shell echo $(VERSION) | sed 's/-/./g') | ||
|
||
ifdef V | ||
$(info TRAVIS_TAG is $(TRAVIS_TAG)) | ||
$(info GITHUB_REF is $(GITHUB_REF)) | ||
$(info VERSION is $(VERSION)) | ||
$(info DEB_VERSION is $(DEB_VERSION)) | ||
$(info PUSHTYPE is $(PUSHTYPE)) | ||
endif | ||
|
||
|
@@ -169,23 +153,3 @@ run: | |
|
||
.PHONY: run | ||
|
||
######################################### | ||
# Debian | ||
######################################### | ||
|
||
changelog: | ||
$Q echo "step-ca ($(DEB_VERSION)) unstable; urgency=medium" > debian/changelog | ||
$Q echo >> debian/changelog | ||
$Q echo " * See https://github.com/smallstep/certificates/releases" >> debian/changelog | ||
$Q echo >> debian/changelog | ||
$Q echo " -- Smallstep Labs, Inc. <[email protected]> $(shell date -uR)" >> debian/changelog | ||
|
||
debian: changelog | ||
$Q mkdir -p $(RELEASE); \ | ||
OUTPUT=../step-ca*.deb; \ | ||
rm $$OUTPUT; \ | ||
dpkg-buildpackage -b -rfakeroot -us -uc && cp $$OUTPUT $(RELEASE)/ | ||
|
||
distclean: clean | ||
|
||
.PHONY: changelog debian distclean |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.