acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

Let phing recognize git environment variables #1249

Closed marvil07 closed 7 years ago

marvil07 commented 7 years ago

My system information:

When I run this command:

export GIT_AUTHOR_EMAIL=foo@example.com
blt deploy

blt uses the global git config user.email as the email set to the author inside the build repository.

I expected blt to use any of the git environment variables, e.g. GIT_AUTHOR_EMAIL, GIT_COMMITTER_EMAIL, and EMAIL; but maybe that is a by design.

For completion, git name can be overriden with GIT_AUTHOR_NAME and GIT_COMMITTER_NAME.

A work-around for now: override blt deploy phing target to set git email, e.g.

    <if>
      <isset property="deploy.gitEmail"/>
      <then>
        <exec command="git config user.email '${deploy.gitEmail}'" dir="${deploy.dir}" />
      </then>
    </if>
grasmash commented 7 years ago

Why not just git config user.name email prior to executing blt deploy ?

grasmash commented 7 years ago

I believe this is resolved by #1323.

You may use project.local.yml to set environment specific values.

marvil07 commented 7 years ago

@grasmash I'm glad to see that feature getting in, but hopefully, we can split that configuration and document it (see #1340), a PR for that proposed on #1341.

Also, I would say that the capability of reading all git environment variables may still be desired, but I will let you decide if you want to reopen this ticket for that.