From 1257032ffce0520217aad668fa1d316f67036fb4 Mon Sep 17 00:00:00 2001 From: Arvind Iyengar Date: Mon, 17 May 2021 15:26:17 -0700 Subject: [PATCH] Drop scripts/stage-release --- scripts/stage-release | 50 ------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100755 scripts/stage-release diff --git a/scripts/stage-release b/scripts/stage-release deleted file mode 100755 index 308b5199d..000000000 --- a/scripts/stage-release +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -set -e - -cd $(dirname $0) - -cd .. - -# Name of the directory where we pull in the current released branch; can be arbitrarily set -RELEASE_BRANCH_DIR=released-branch-dir - -if [ -z ${RELEASE_REPO_URL} ] || [ -z ${RELEASE_BRANCH} ]; then - echo "Usage: RELEASE_REPO_URL= RELEASE_BRANCH= make stage-release" - exit 1 -fi - -# Print a warning if a developer tries to invoke this script locally -if [[ -z ${FROM_WORKFLOW} ]]; then - echo "" - echo "Unexpected Behavior: Detected that this script was invoked outside of a Github Workflow since FROM_WORKFLOW is unset." - echo "- This script is only intended to be run as part of a Github Workflow on your source branch, once changes have already been pushed to your remote." - echo "- This script will only generate the released/ directory based on what would be run on a 'make sync' on ${RELEASE_REPO_URL}@${RELEASE_BRANCH}" - echo "- If a change is made locally in this branch but not committed to the remote Github repository, it will not be staged by this script." - echo "" - echo "Proceed with caution!" - echo "" -fi - -echo "Regenerating released/ based on ${RELEASE_REPO_URL}@${RELEASE_BRANCH}..." - -rm -rf released -mkdir -p released - -echo "Pulling in ${RELEASE_REPO_URL}@${RELEASE_BRANCH} into ${RELEASE_BRANCH_DIR}" -rm -rf ${RELEASE_BRANCH_DIR} - -git clone --depth 1 --branch ${RELEASE_BRANCH} ${RELEASE_REPO_URL} ${RELEASE_BRANCH_DIR} 2>/dev/null - -cd ${RELEASE_BRANCH_DIR} - -make sync -cp -R assets/ ../released/assets -cp -R charts/ ../released/charts -cp -R index.yaml ../released/index.yaml - -cd .. -rm -rf ${RELEASE_BRANCH_DIR} - -# Modify the index.yaml to point to the released/ directory only -helm repo index --url released/assets released/assets -mv released/assets/index.yaml index.yaml \ No newline at end of file