rev-manifest.json is not updated (Heroku environment)

Posted 3 years ago by SergioGregorutti

Hi all,

I have a Laravel application on a Heroku server.

Im using the Heroku multi buildpack that includes PHP, Node, Gulp, etc.

My Gulp file is working fine on my local environment but for some reason when I hit the "gulp" command on Heroku ("heroku run gulp") the files are generated but the rev-manifest.json is not updated, so I can't see the changes on the site.

This is my gulp file:

var gulp = require("gulp");
var elixir = require('laravel-elixir');

elixir(function(mix) {
    // Compile main less styles
    mix.less('global.less');

    // Compile admin less styles
    mix.less('global-admin.less');

    // jQuery
    mix.copy(
        'vendor/bower_components/jquery/dist/jquery.min.js',
        'public/js/vendor/jquery.js'
    );

    // Bootstrap JS
    mix.copy(
        'vendor/bower_components/bootstrap/dist/js/bootstrap.min.js',
        'public/js/vendor/bootstrap.js'
    );

    // Checkboxes
    mix.copy(
        'vendor/bower_components/jquery-icheck/icheck.min.js',
        'public/js/vendor/checkboxes.js'
    );
    mix.copy(
        'vendor/bower_components/jquery-icheck/skins/minimal/blue.css',
        'public/css/vendor/checkboxes.css'
    );

    // jQuery Validate
    mix.copy(
        'vendor/bower_components/jquery-validate/dist/jquery.validate.min.js',
        'public/js/vendor/validation.js'
    );

    // Select2
    mix.copy(
        'vendor/bower_components/select2/dist/js/select2.full.min.js',
        'public/js/vendor/selects.js'
    );
    mix.copy(
        'vendor/bower_components/select2/dist/css/select2.min.css',
        'public/css/vendor/selects.css'
    );

    // Jasny Bootstrap
    mix.copy(
        'vendor/bower_components/jasny-bootstrap/dist/js/jasny-bootstrap.min.js',
        'public/js/vendor/jasny.js'
    );
    mix.copy(
        'vendor/bower_components/jasny-bootstrap/dist/css/jasny-bootstrap.min.css',
        'public/css/vendor/jasny.css'
    );

    // DataTables
    mix.copy(
        'vendor/bower_components/datatables/media/js/jquery.dataTables.min.js',
        'public/js/vendor/datatables.js'
    );
    mix.copy(
        'vendor/bower_components/datatables/media/js/dataTables.bootstrap.min.js',
        'public/js/vendor/datatables-bootstrap.js'
    );
    mix.copy(
        'vendor/bower_components/datatables/media/css/dataTables.bootstrap.min.css',
        'public/css/vendor/datatables-bootstrap.css'
    );

    // Compile app.css
    mix.styles([
        'global.css'
    ], 'public/css/app.css', 'public/css');

    // Compile admin.css
    mix.styles([
        'global-admin.css',
        'vendor/datatables-bootstrap.css'
    ], 'public/css/admin.css', 'public/css');

    // Compile app.js
    mix.scripts([
        'vendor/jquery.js',
        'vendor/bootstrap.js',
        'controllers/general-controller.js',
        'controllers/common/login-controller.js'
    ], 'public/js/app.js', 'public/js');

    // Compile forms.css
    mix.styles([
        'vendor/checkboxes.css',
        'vendor/selects.css',
        'vendor/jasny.css'
    ], 'public/css/forms.css', 'public/css');

    // Compile forms.js
    mix.scripts([
        'vendor/checkboxes.js',
        'vendor/selects.js',
        'vendor/jasny.js',
        'vendor/validation.js',
        'controllers/forms-controller.js'
    ], 'public/js/forms.js', 'public/js');

    // Compile landing.js
    mix.scripts([
        'controllers/landing-controller.js'
    ], 'public/js/landing.js', 'public/js');

    // Compile app.js (admin)
    mix.scripts([
        'vendor/datatables.js',
        'vendor/datatables-bootstrap.js'
    ], 'public/js/admin/app.js', 'public/js');

    // Version scripts
    mix.version([
        "./public/css/app.css",
        "./public/css/admin.css",
        "./public/css/forms.css",
        "./public/js/app.js",
        "./public/js/forms.js",
        "./public/js/landing.js",
        "./public/js/admin/app.js"
    ]);
});

gulp.task('heroku:', function() {
    console.log('Heroku stage');
});

Any ideas of what can be happening?

Thanks in advance!

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.