github.com/verrazzano/verrazzano@v1.7.0/release/Makefile (about)

     1  # Copyright (c) 2022, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  
     4  SCRIPT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
     5  
     6  # If RELEASE_VERSION is not set, use .verrazzano-development-version
     7  RELEASE_VERSION ?= $(shell grep verrazzano-development-version ${SCRIPT_DIR}/../.verrazzano-development-version | sed -e 's/verrazzano-development-version=//')
     8  
     9  # File containing list of images
    10  ifndef VZ_IMAGES_LIST
    11  $(error Environment variable VZ_IMAGES_LIST, defining the components and corresponding images, is not defined)
    12  endif
    13  
    14  # File containing the source repository URLs
    15  ifndef VZ_REPO_URLS
    16  $(error Environment variable VZ_REPO_URLS, containing the repository URLs for the Verrazzano components, is not defined)
    17  endif
    18  
    19  # Define default values for the directory to download the source and create the archive
    20  OUTPUT_DIR ?= ${SCRIPT_DIR}/out/source
    21  ARCHIVE_DIR ?= ${SCRIPT_DIR}/out/archive
    22  
    23  .PHONY: source-archive
    24  source-archive:
    25  	# Dry run to validate VZ_REPO_URLS contains all the required files
    26  	${SCRIPT_DIR}/scripts/download_source_prt.sh -i ${VZ_IMAGES_LIST} -r ${VZ_REPO_URLS} -s ${OUTPUT_DIR} -d true; \
    27  
    28  	# Download the source files
    29  	${SCRIPT_DIR}/scripts/download_source_prt.sh -i ${VZ_IMAGES_LIST} -r ${VZ_REPO_URLS} -s ${OUTPUT_DIR}; \
    30  
    31  	# Create the archive from the downloaded source
    32  	${SCRIPT_DIR}/scripts/archive_source_prt.sh ${OUTPUT_DIR} ${ARCHIVE_DIR} ${RELEASE_VERSION}; \
    33