#!/bin/bash set -euo pipefail set -x SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" files_to_update=( deployments/k8s/helm/signalfx-agent/Chart.yaml deployments/k8s/helm/signalfx-agent/values.yaml deployments/ecs/signalfx-agent-task.json deployments/fargate/example-fargate-task.json Dockerfile.rhel ) new_version=$1 for f in ${files_to_update[@]}; do sed -i '' -E -e "s/[4-9]+\.[0-9]+\.[0-9]+/$new_version/g" $f done # This will update the derived k8s resources with the new version AGENT_RELEASE_VERSION=$new_version deployments/k8s/generate-from-helm