Skip to content

Commit

Permalink
Release script: commit package-lock.json
Browse files Browse the repository at this point in the history
Commit the package-lock.json when bumping the version, otherwise
the versions get out of sync, and this is going to matter more now
that jenkins runs `npm ci` which is fussy about these things.
  • Loading branch information
dbkr committed Feb 13, 2019
1 parent 4309749 commit 68c8fe0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,15 @@ echo "npm version"
# only turn off both of these behaviours, so we have to
# manually commit the result.
npm version --no-git-tag-version "$release"
git commit package.json -m "$tag"

# commit package-lock.json if it exists and is versioned
if [[ -f package-lock.json && -z `git st --porcelain --ignored package-lock.json` ]];
then
pkglock='package-lock.json'
else
pkglock=''
fi
git commit package.json $pkglock -m "$tag"


# figure out if we should be signing this release
Expand Down

0 comments on commit 68c8fe0

Please sign in to comment.