-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git info is generated in the dist dir #52
Comments
I suspect that this line should probably pass the project root ( |
I'm not sure but maybe I'm running into this same issue trying to use the ember js buildpack on heroku?
Setting GIT_DISCOVERY_ACROSS_FILESYSTEM to 1 did not seem to fix the error for me. However the message |
That looks very much like the same issue. |
Trying to fix ember-cli-deploy#52
So looks like I don't need any of the FWIW I attempted to implement @achambers ' proposed fix, but the |
@mcfiredrill said:
I find this strange as you can see that it's put in to the context here -> https://github.com/ember-cli-deploy/ember-cli-deploy/blob/master/lib/tasks/pipeline.js#L64 Weird. |
Did you see my patch? Perhaps I'm doing it wrong. |
@mcfiredrill I just saw it then. Are you sure the I got the root prop slightly wrong. It's actually Could that have been your issue? |
@achambers I think the error was |
Hmmm. That's surprising to me. I'll have a look when I get to work |
I ran into this issue today. Any updates on it? |
Ran into this issue today as well, running on Heroku:
|
@mirague Fancy looking in to the suggested fix I mentioned further up and submitting a PR? |
@achambers On Heroku I know for a fact they remove the As for diving into this I'm not currently at capacity to do so, I recently started with Ember and got into the deploying only today. I'm trying to think of ideas how we can expose the latest git tags inside the Heroku build process.. I know there's an env variable Update: I can get the version from |
@achambers I'm willing to give it a shot if you can help me out a bit. Any first steps/pointers to get me started? |
mcfiredrill@975cb56 worked for me on 1.0.0 |
@ssendev On Heroku? |
@mirague local with |
@achambers |
Trying to fix ember-cli-deploy#52
To solve the Heroku scenario we might want to be able to pass in a We could have something like this: // in any case we prefer the git-commit resolver
ENV['revision-data'] = {
type: 'git-commit'
};
// Heroku doesn't have the .git context, use the custom resolver
if (process.env.SOURCE_VERSION) {
ENV['revision-data'] = {
type: 'custom',
revisionKey: function () {
return process.env.SOURCE_VERSION;
}
}
} cc @achambers |
I just ran into this today for Heroku as well. I did not attempt the My workaround uses // Heroku doesn't have the .git context, thereforew we choose
// type and scm value which don't depend on .git repos or require('git-repo-info')
const isHerokuDeploy = !!process.env.SOURCE_VERSION;
if (isHerokuDeploy) {
ENV["revision-data"] = {
type: 'file-hash'
scm: null
};
} else {
ENV["revision-data"] = {
type: 'git-commit' // <= The `type` you want to use if is not heroku deploy
};
} Then later on in another deployment hook . . . const sha = process.env.SOURCE_VERSION || context.revisionData.scm.sha; |
No news on this issue? I've just been bitten by it... |
The Git info is currently generated in the dist dir which causes problems if that dir is outside of the repo.
In our case we're deploying from a Docker container and mount the host's
tmp
dir as thetmp
dir in the container. As that dir is a volume then and no regular folder any git operations performed in that dir won't work, leading to the error:The error in
git.js
being a consequence of the first 2 lines really:export GIT_DISCOVERY_ACROSS_FILESYSTEM = 1
actually does fix the problem for us but it seems suspicious that the git info is generated from the dist dir as opposed to the root of the repo or working directory thatember deploy
is run from.The text was updated successfully, but these errors were encountered: