From c408510c3a048cc76da26ba26cb7c8e8b619dfe5 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Thu, 11 Nov 2021 18:06:56 -0600 Subject: [PATCH] Add Support for Pre-Release Tag Specification (#1491) --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6e2a1117cd2..d463fbcc50d 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,7 @@ ENDPOINT_PREFIX_JSON=${CODEGEN_RESOURCES_PATH}/endpoint-prefix.json LICENSE_FILE=$(shell pwd)/LICENSE.txt SMITHY_GO_VERSION ?= +PRE_RELEASE_VERSION ?= RELEASE_MANIFEST_FILE ?= RELEASE_CHGLOG_DESC_FILE ?= @@ -57,6 +58,12 @@ REPOTOOLS_CMD_EDIT_MODULE_DEPENDENCY = ${REPOTOOLS_MODULE}/cmd/editmoduledepende REPOTOOLS_CALCULATE_RELEASE_VERBOSE ?= false REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG=-v=${REPOTOOLS_CALCULATE_RELEASE_VERBOSE} +REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS ?= + +ifneq ($(PRE_RELEASE_VERSION),) + REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION} +endif + .PHONY: all all: generate unit @@ -398,7 +405,7 @@ ls-changes: go run ${REPOTOOLS_CMD_CHANGELOG} ls preview-release: - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} + go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS} pre-release-validation: @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \ @@ -409,7 +416,7 @@ pre-release-validation: fi release: pre-release-validation - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} + go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CALCULATE_RELEASE_VERBOSE_FLAG} ${REPOTOOLS_CALCULATE_RELEASE_ADDITIONAL_ARGS} go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE} go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE} go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE}