Skip to content
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

Replace postinstall script with Heroku's postbuild script #530

Merged
merged 1 commit into from
Jul 14, 2017

Conversation

gemmaleigh
Copy link
Contributor

What problem does the pull request solve?

The postinstall script is causing the npm release of govuk-elements-sass to fail.

Since this script was added to build assets for Heroku, instead use
a Heroku-specific build step.

Replace postinstall with heroku-postbuild, which runs after Heroku installs dependencies.

What type of change is it?

  • Bug fix (non-breaking change which fixes an issue)

Has the documentation been updated?

  • I have read the CONTRIBUTING document.

The postinstall script is causing the npm deployment step to fail.
https://travis-ci.org/alphagov/govuk_elements/jobs/253564908#L384

Since this script was added to build assets for Heroku, instead use
a heroku specific build step.

Instead run heroku-postbuild which runs after Heroku installs dependencies.
@gemmaleigh gemmaleigh temporarily deployed to govuk-elements-review-pr-530 July 14, 2017 14:45 Inactive
@gemmaleigh gemmaleigh requested a review from 36degrees July 14, 2017 14:48
@gemmaleigh
Copy link
Contributor Author

-----> Deleting 1 files matching .slugignore patterns.
-----> Node.js app detected
-----> Creating runtime environment
       
       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=false
       NODE_VERBOSE=false
       NODE_ENV=development
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  >=8.1.4
       engines.npm (package.json):   unspecified (use default)
       
       Resolving node version >=8.1.4 via semver.io...
       Downloading and installing node 8.1.4...
       Using default npm version: 5.0.3
-----> Restoring cache
       Skipping cache restore (new-signature)
-----> Building dependencies
       Installing node modules (package.json)
       
       > [email protected] install /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/node_modules/node-sass
       > node scripts/install.js
       
       Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-57_binding.node
       Download complete
       Binary saved to /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/node_modules/node-sass/vendor/linux-x64-57/binding.node
       Caching binary to /app/.npm/node-sass/4.5.3/linux-x64-57_binding.node
       
       > [email protected] install /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/node_modules/fsevents
       > node install
       
       
       > [email protected] postinstall /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/node_modules/node-sass
       > node scripts/build.js
       
       Binary found at /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/node_modules/node-sass/vendor/linux-x64-57/binding.node
       Testing binary
       Binary is fine
       added 849 packages in 71.029s
       Running heroku-postbuild
       
       > govuk-elements@ heroku-postbuild /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d
       > gulp build
       
       [14:47:17] Using gulpfile /tmp/build_8bab95e8869563c6dfe9170452a7733b/alphagov-govuk_elements-c2e988d/gulpfile.js
       [14:47:17] Starting 'build'...
       [14:47:17] Starting 'clean'...
       [14:47:17] Finished 'clean' after 8.11 ms
       [14:47:17] Starting 'styles'...
       [14:47:17] Starting 'images'...
       [14:47:17] Starting 'scripts'...
       [14:47:17] Finished 'scripts' after 105 ms
       [14:47:17] Finished 'images' after 508 ms
       [14:47:19] Finished 'styles' after 1.69 s
       [14:47:19] Finished 'build' after 1.7 s
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
-----> Discovering process types
       Procfile declares types -> web
-----> Compressing...
       Done: 30.7M
-----> Launching...
       Released v4
       https://govuk-elements-review-pr-530.herokuapp.com/ deployed to Heroku

@gemmaleigh gemmaleigh merged commit 84c8707 into master Jul 14, 2017
@gemmaleigh gemmaleigh deleted the fix-postinstall-script branch July 14, 2017 14:58
@36degrees 36degrees mentioned this pull request Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants