ember-cli-deploy / ember-cli-deploy-revision-data

An ember-cli-plugin to create a unique revision key for the build
MIT License
22 stars 57 forks source link

Different Environment doesn't work #51

Closed brunosalgueiro closed 7 years ago

brunosalgueiro commented 7 years ago

Hello, I have a project in Ember and I'm doing the building process, on this proccess I'm using "revision-data" on pipeline, When I try to do deploy for production, everything works and you can see the expected results here:

drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  4 17:36 ./
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  4 17:37 ../
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  3 17:32 fonts/
-rw-r--r-- 1 mtzcpd604 1049089  782533 Jan  4 17:36 frontresponsivo-cvc-cars-13f27e68b8f53d1fbda16b1ae7733fcc.js
-rw-r--r-- 1 mtzcpd604 1049089  565671 Jan  4 17:36 frontresponsivo-cvc-cars-baa8443ae38616b2cad48363accbdc69.css
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  3 17:32 images/
-rw-r--r-- 1 mtzcpd604 1049089   30952 Jan  4 17:36 vendor-0cf02e6a64ccf64b70b8463ed664a36d.css
-rw-r--r-- 1 mtzcpd604 1049089 2402745 Jan  4 17:36 vendor-fa34af23917ae2ae062315bf579228e1.js

But when I try to use another environment like "development" or "qa", file hash doesn't work like production, they don't have file hash, minify and other proccess from production pipeline, you can see the results here:

drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  4 20:05 ./
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  4 20:06 ../
-rw-r--r-- 1 mtzcpd604 1049089   26702 Jan  4 20:05 failed.png
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  3 17:32 fonts/
-rw-r--r-- 1 mtzcpd604 1049089  785214 Jan  4 20:05 frontresponsivo-cvc-cars.css
-rw-r--r-- 1 mtzcpd604 1049089 1224496 Jan  4 20:05 frontresponsivo-cvc-cars.js
-rw-r--r-- 1 mtzcpd604 1049089 1438348 Jan  4 20:05 frontresponsivo-cvc-cars.map
drwxr-xr-x 1 mtzcpd604 1049089       0 Jan  3 17:32 images/
-rw-r--r-- 1 mtzcpd604 1049089   16445 Jan  4 20:05 passed.png
-rw-r--r-- 1 mtzcpd604 1049089    2550 Jan  4 20:05 test-loader.js
-rw-r--r-- 1 mtzcpd604 1049089    5641 Jan  4 20:05 test-support.css
-rw-r--r-- 1 mtzcpd604 1049089  243639 Jan  4 20:05 test-support.js
-rw-r--r-- 1 mtzcpd604 1049089  305131 Jan  4 20:05 test-support.map
-rw-r--r-- 1 mtzcpd604 1049089  116883 Jan  4 20:05 tests.js
-rw-r--r-- 1 mtzcpd604 1049089  145805 Jan  4 20:05 tests.map
-rw-r--r-- 1 mtzcpd604 1049089   38431 Jan  4 20:05 vendor.css
-rw-r--r-- 1 mtzcpd604 1049089 6268484 Jan  4 20:05 vendor.js
-rw-r--r-- 1 mtzcpd604 1049089 7456505 Jan  4 20:05 vendor.map

There are some functions that I know that I can do inside ember-cli-build, like:

 minifyJS: {
     enabled: true
    }

But I need the "file-hash" on my development environment, so I would like to do something like that, to solve my problem of file hash:

'revision-data': {
      enabled: true
    }

Is there some configuration, shortcut or something to notify the build proccess to change those files?

lukemelia commented 7 years ago

@brunosalgueiro this blog post does a great job explaining what's going on and how you should approach it. http://blog.firstiwaslike.com/staging-environments-with-ember-cli-deploy/