diff --git a/bin/init b/bin/init index a1513fa7d..220c2fc33 100755 --- a/bin/init +++ b/bin/init @@ -10,8 +10,8 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then fi copy_template_if_absent environments.yaml environments.yaml.tmpl -copy_template_if_absent etc/production.yaml etc/base.yaml copy_template_if_absent etc/production.yaml.gotmpl etc/base.yaml.gotmpl +create_production_yaml DNAME="$DNAME" bin/keystore-init bin/generate-secrets diff --git a/bin/util.sh b/bin/util.sh index 97e2c3430..bd3a8a767 100755 --- a/bin/util.sh +++ b/bin/util.sh @@ -45,6 +45,14 @@ copy_template_if_absent() { fi } +create_production_yaml() { + copy_template_if_absent etc/production.yaml etc/base.yaml + tempfile=$(mktemp) + mv etc/production.yaml $tempfile + # remove all '_chart_version' fields + cat $tempfile | grep -v _chart_version > etc/production.yaml +} + # Copies the template (defined by the given config file with suffix # ".template") to intended configuration file. copy_template() {