This package has been deprecated

Author message:

This package is now called `greenkeeper-lockfile`. It supports npm5 and the new `package-lock.json`.

greenkeeper-shrinkwrap

1.0.13 • Public • Published

greenkeeper-shrinkwrap

Enabling shrinkwrap support for Greenkeeper via Travis CI

Greenkeeper badge Build Status Dependency Status devDependency Status js-standard-style semantic-release

NPM

Setup

After enabling Greenkeeper for your repository you can use this package to make it work with shrinkwrapped projects.

  1. Create a GitHub access token with push access to your repository and make it available to Travis CI's environment as GH_TOKEN.

  2. Configure Travis CI to use the npm version you want your shrinkwrap files to be generated with before it npm installs your dependencies.

before_install:
# It is advisable to use latest npm, as there are a lot of shrinkwrap fixes in there
- npm install -g npm
  1. Install greenkeeper-shrinkwrap as well.
before_install:
- npm install -g npm
- npm install -g greenkeeper-shrinkwrap@1
  1. Configure Travis CI to run greenkeeper-shrinkwrap-update right before it executes your tests.
before_script: greenkeeper-shrinkwrap-update
  1. Configure Travis CI to run greenkeeper-shrinkwrap-upload right after it executed your tests.
after_script: greenkeeper-shrinkwrap-upload

Testing multiple node versions

It is common to test multiple node versions and therefor have multiple test jobs for one build. In this case the shrinkwrap will automatically be updated for every job, but only uploaded for the first one.

node_js:
  - 6
  - 4
before_install:
- npm install -g npm
- npm install -g greenkeeper-shrinkwrap@1
before_script: greenkeeper-shrinkwrap-update
# Only the node version 6 job will upload the shrinkwrap
after_script: greenkeeper-shrinkwrap-upload

How does it work

  1. This script detects whether it's running on a Greenkeeper created branch
  2. If so it updates the shrinkwrap file with the latest version of the updated dependency
  3. It pushes the commit with the updated shrinkwrap file back to the Greenkeeper branch/pull request

Readme

Keywords

none

Package Sidebar

Install

npm i greenkeeper-shrinkwrap

Weekly Downloads

0

Version

1.0.13

License

Apache-2.0

Last publish

Collaborators

  • greenkeeper
  • boennemann