title: how to replace substitute string in cloudbuild.yaml
body: <p>how to replace substitute string in cloudbuild.yaml?</p>
  
  <p>I want to set appengine version as $TAG_NAME with cloudbuild. Since the version only accept hyphen, I need to replace the dot to hyphen first.</p>
  
  <p>I tried:</p>
  
  <pre><code>steps:
  - name: 'gcr.io/cloud-builders/gcloud'
    args: ['app', 'deploy', '--no-promote', "--version=$(echo $TAG_NAME | sed 's/[.]/-/g')"]
  timeout: '1600s'
  </code></pre>
  
  <p>But got </p>
  
  <pre><code>ERROR: (gcloud.app.deploy) argument --version/-v: Bad value [$(echo 0.0.1a4 | sed 's/[.]/-/g')]: May only contain lowercase letters, digits, and hyphens. Must begin and end with a letter or digit. Must not exceed 63 characters.
  </code></pre>