Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
disable package-lock.json on Travis
Browse files Browse the repository at this point in the history
Travis frontend builds run on a Linux platform, different from the Mac
platform typically used for development. This can cause differences in
the package-lock.json file due to the inclusion of optional modules.

See this lengthy npm thread that describes the problem:

npm/npm#17722

To avoid this issue, this change runs `npm config set package-lock
false` to disable the use of lock files when doing the npm install.

We already do something similar to this in Capital Framework:

https://github.com/cfpb/capital-framework/blob/821dd4fafb65b947ea436fd57b18a195f57e71b2/.travis.yml#L9

This change is needed because if the package-lock.json file is modified
by the build, then the Python wheel name generated by
setuptools-git-version is marked as dirty and won't match the latest
tag. This has bitten us before on other repositories.
  • Loading branch information
chosak committed Jul 20, 2018
1 parent 0a724eb commit 3354ba8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ before_script:
- npm install -g bower gulp-cli
- bower install
script:
- npm config set package-lock false
- tox
- python2.7 setup.py bdist_wheel
- ls dist/*
Expand Down

0 comments on commit 3354ba8

Please sign in to comment.