From 2b76d1163186b044f6d1e5b73c9479fb458def6c Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 20 Mar 2023 21:03:37 -0700 Subject: [PATCH] Clean up Makefile and fix goreleaser deprecation --- .goreleaser.yml | 2 ++ Makefile | 42 +++--------------------------------------- debian/changelog | 5 ----- debian/compat | 1 - debian/control | 15 --------------- debian/rules | 13 ------------- debian/source/format | 1 - 7 files changed, 5 insertions(+), 74 deletions(-) delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100755 debian/rules delete mode 100644 debian/source/format diff --git a/.goreleaser.yml b/.goreleaser.yml index e8f0a9b3..42b313b4 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -36,6 +36,7 @@ archives: # Most common use case is to archive as zip on Windows. # Default is empty. name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Version }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" + rlcp: true format_overrides: - goos: windows format: zip @@ -78,6 +79,7 @@ nfpms: source: enabled: true + rlcp: true name_template: '{{ .ProjectName }}_{{ .Version }}' checksum: diff --git a/Makefile b/Makefile index 6665b0cc..b6408174 100644 --- a/Makefile +++ b/Makefile @@ -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,6 +21,8 @@ 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% @@ -30,17 +30,8 @@ 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. $(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 diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 8267efed..00000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -step-ca (0.8.4-14-ge72f087-dev) unstable; urgency=medium - - * See https://github.com/smallstep/certificates/releases - - -- Smallstep Labs, Inc. Wed, 20 Feb 2019 20:44:25 +0000 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index f599e28b..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/debian/control b/debian/control deleted file mode 100644 index 0a3f6680..00000000 --- a/debian/control +++ /dev/null @@ -1,15 +0,0 @@ -Source: step-ca -Section: utils -Priority: optional -Maintainer: Smallstep Labs, Inc. -Build-Depends: debhelper (>= 9), git, bash-completion -Standards-Version: 4.2.0 -Homepage: https://github.com/smallstep/certificates -Vcs-Browser: https://github.com/smallstep/certificates.git -Vcs-Git: https://github.com/smallstep/certificates.git - -Package: step-ca -Architecture: any -Depends: ${misc:Depends} -Description: Smallstep Certificate Authority - step-ca is the Smallstep Certificate Authority. diff --git a/debian/rules b/debian/rules deleted file mode 100755 index f5b70196..00000000 --- a/debian/rules +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/make -f - -override_dh_install-arch: - dh_install --arch - -build: - dh build - -override_dh_auto_build: - dh_auto_build -- build - -%: - dh $@ diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8d..00000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt)