You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Many times we need to use commit sha's to fill up some info in the applications developed. For example, we use the commit SHA as the version in the deployed frontends and backends.
Today we need to reuse the COMMIT_SHA env variable from the CI run:
tasks:
build-frontend:
platform: buncommand: bun --bun run vite buildinputs:
- "@group(sources)"outputs:
- disttype: builddeps:
- build
- lint
- format-check
- testenv:
NODE_ENV: productionVITE_SENTRY_RELEASE: ${COMMIT_SHA}
In Github actions for the PR we pass it as an env:
- name: Deployrun: moon run :deployenv:
COMMIT_SHA: ${{ github.sha }}
But locally if I'm running moon ci it would be way more beneficial to have this as a token ($gitHash and $gitHashShort) so moon could infer this to me by running:
git rev-parse HEAD
Then I wouldn't need to setup this in CI and locally. Moon would be smart enough to fill this up for me so I could use.
Describe the solution you'd like
Adding 2 tokens $gitHash and $gitHashShort so I could use them in the tasks.yaml file like this:
tasks:
build-frontend:
platform: buncommand: bun --bun run vite buildinputs:
- "@group(sources)"outputs:
- disttype: builddeps:
- build
- lint
- format-check
- testenv:
NODE_ENV: productionVITE_SENTRY_RELEASE: $gitHash
Describe alternatives you've considered
Today I inject myself during CI.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Many times we need to use commit sha's to fill up some info in the applications developed. For example, we use the commit SHA as the version in the deployed frontends and backends.
Today we need to reuse the COMMIT_SHA env variable from the CI run:
In Github actions for the PR we pass it as an env:
Or in the main branch:
But locally if I'm running
moon ci
it would be way more beneficial to have this as a token ($gitHash
and$gitHashShort
) so moon could infer this to me by running:Then I wouldn't need to setup this in CI and locally. Moon would be smart enough to fill this up for me so I could use.
Describe the solution you'd like
Adding 2 tokens
$gitHash
and$gitHashShort
so I could use them in the tasks.yaml file like this:Describe alternatives you've considered
Today I inject myself during CI.
The text was updated successfully, but these errors were encountered: