ember-cli-new-version icon indicating copy to clipboard operation
ember-cli-new-version copied to clipboard

Issues with ember-cli-deploy

Open st-h opened this issue 3 years ago • 1 comments

It seems like this did not work for a much longer time, but I never noticed it because on previous ember-cli-new-version versions a version.txt containing an invalid version number, would not trigger a notification. (at least that was what I observed when deploying an older version which depends on ember-cli-new-version:2.0.2)

I have configured ember-cli-deploy to host my ember app on an s3 bucket, which uses a prefix:

ENV.s3.prefix = 'app';

However, ember-cli-new-version tries to look it up under the root domain.com/version.txt. I tried to look into it a bit, but I know very little about the ember-cli-deploy internals, and it seems that the cli-deploy config is not available at runtime. I am not even sure if we can get the information added in deploy.js from within a regular addon. Long story short, I don't know if ember-cli-deploy support is even possible without making it a ember-cli-deploy-plugin.

I tried to add ENV.prepend = "/app/"; to my deploy.js but when debugging into the ember-cli-new-version service, it was undefined

However, it probably would be possible to add a prepend config to the ember-cli-new-version config, which allows to specify a prefix, that does not influence the brocolli-asset-rev behaviour.

What are your thoughts on this issue?

st-h avatar Jan 07 '22 17:01 st-h

It looks like the ember-cli-deploy pipeline is unaffected by setting ENV.prepend. So, it seems that I can set an env variable in deploy.js depending on the deploy target:

process.env.STATIC_DOMAIN = 'https://static.mydomain.com/app/'

and then reference that in environment.js:

let ENV = {
  prepend: process.env.STATIC_DOMAIN,
}

in order to work around the issue

st-h avatar Jan 08 '22 15:01 st-h