some tweaks
This commit is contained in:
+13
-13
@@ -42,10 +42,13 @@ main() {
|
|||||||
local repo=
|
local repo=
|
||||||
local production=
|
local production=
|
||||||
local charts_repo_url=
|
local charts_repo_url=
|
||||||
|
local token=${CR_TOKEN:-none}
|
||||||
|
|
||||||
parse_command_line "$@"
|
parse_command_line "$@"
|
||||||
|
if [ "${token}" == "none" ]; then
|
||||||
: "${CR_TOKEN:?Environment variable CR_TOKEN must be set}"
|
echo "env CR_TOKEN not found, defaulting to production=false"
|
||||||
|
production="false"
|
||||||
|
fi
|
||||||
|
|
||||||
local repo_root
|
local repo_root
|
||||||
repo_root=$(git rev-parse --show-toplevel)
|
repo_root=$(git rev-parse --show-toplevel)
|
||||||
@@ -75,7 +78,7 @@ main() {
|
|||||||
prep_app "${chart}"
|
prep_app "${chart}"
|
||||||
helm dependency update "${chart}" --skip-refresh
|
helm dependency update "${chart}" --skip-refresh
|
||||||
package_chart "$chart"
|
package_chart "$chart"
|
||||||
if [ -d "${chart}/SCALE" ]; then
|
if [[ -d "${chart}/SCALE" ]]; then
|
||||||
clean_apps "$chart" "$chartname" "$train" "$chartversion"
|
clean_apps "$chart" "$chartname" "$train" "$chartversion"
|
||||||
patch_apps "$chart" "$chartname" "$train" "$chartversion"
|
patch_apps "$chart" "$chartname" "$train" "$chartversion"
|
||||||
copy_apps "$chart" "$chartname" "$train" "$chartversion"
|
copy_apps "$chart" "$chartname" "$train" "$chartversion"
|
||||||
@@ -86,7 +89,7 @@ main() {
|
|||||||
echo "Chart '$chart' no longer exists in repo. Skipping it..."
|
echo "Chart '$chart' no longer exists in repo. Skipping it..."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [[ -n "${production}" ]]
|
if [ "${production}" == "true" ]; then
|
||||||
release_charts
|
release_charts
|
||||||
fi
|
fi
|
||||||
update_index
|
update_index
|
||||||
@@ -158,9 +161,8 @@ parse_command_line() {
|
|||||||
config="$2"
|
config="$2"
|
||||||
shift
|
shift
|
||||||
else
|
else
|
||||||
echo "ERROR: '--config' cannot be empty." >&2
|
config=".github/cr.yaml"
|
||||||
show_help
|
shift
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-v|--version)
|
-v|--version)
|
||||||
@@ -225,15 +227,13 @@ parse_command_line() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ -z "$owner" ]]; then
|
if [[ -z "$owner" ]]; then
|
||||||
echo "ERROR: '-o|--owner' is required." >&2
|
echo "No owner configured, defaulting to truecharts" >&2
|
||||||
show_help
|
owner="truecharts"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$repo" ]]; then
|
if [[ -z "$repo" ]]; then
|
||||||
echo "ERROR: '-r|--repo' is required." >&2
|
echo "No repo configured, defaulting to apps" >&2
|
||||||
show_help
|
repo="apps"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$charts_repo_url" ]]; then
|
if [[ -z "$charts_repo_url" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user