Skip to content

Commit

Permalink
fix: added bump of package-lock.json to gulp release task (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-zoharmuzafi authored Mar 7, 2019
1 parent 0bb0eb1 commit f2c423b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
10 changes: 0 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
<a name="1.15.6"></a>
## <small>1.15.6 (2019-02-26)</small>

* docs: updated paper to 2.0.11 + checked package-lock (#446) ([54ddad0](https://github.com/bigcommerce/stencil-cli/commit/54ddad0))
* fix: revert paper_2.0.11 pr (#445) ([adf424f](https://github.com/bigcommerce/stencil-cli/commit/adf424f))
* Docs: upgraded paper (#441) ([26b3937](https://github.com/bigcommerce/stencil-cli/commit/26b3937))
* feat(theme): add csrf protection to the list of valid features ([fe4b795](https://github.com/bigcommerce/stencil-cli/commit/fe4b795))



<a name="1.15.5"></a>
## <small>1.15.5 (2019-02-05)</small>

Expand Down
11 changes: 9 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const git = require('gulp-git-streamed');
const gulp = require('gulp');
const gulpif = require('gulp-if');
const gutil = require('gulp-util');
const supportedLockFileVersion = [1];
const prompt = require('gulp-prompt');
const semver = require('semver');

Expand Down Expand Up @@ -74,7 +75,13 @@ function bumpTask() {
targetVersion = (res.type !== 'custom') ? semver.inc(currentVersion, res.type) : res['custom-version'];
responses = res;

return gulp.src('package.json')
const packageLock = require('./package-lock.json');

if (!supportedLockFileVersion.includes(packageLock["lockfileVersion"])) {
throw new Error(`Release script only supports version ${supportedLockFileVersion}`);
}

return gulp.src(['package.json', 'package-lock.json'])
// bump the version number in those files
.pipe(bump({ version: targetVersion }))
// save it back to filesystem
Expand All @@ -100,7 +107,7 @@ function uninstallPrivateDependencies() {
}

function pushTask() {
return gulp.src(['package.json', 'CHANGELOG.md', 'server/plugins/stencil-editor/public/dist/app.js', 'server/plugins/stencil-editor/public/dist/ng-stencil-editor/css/ng-stencil-editor.min.css', 'server/plugins/stencil-editor/public/dist/stencil-preview-sdk.js'])
return gulp.src(['package.json', 'package-lock.json', 'CHANGELOG.md', 'server/plugins/stencil-editor/public/dist/app.js', 'server/plugins/stencil-editor/public/dist/ng-stencil-editor/css/ng-stencil-editor.min.css', 'server/plugins/stencil-editor/public/dist/stencil-preview-sdk.js'])
// Add files
.pipe(git.add())
// Commit the changed version number
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bigcommerce/stencil-cli",
"version": "1.15.6",
"version": "1.15.5",
"description": "CLI tool to run BigCommerce Stores locally for theme development.",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit f2c423b

Please sign in to comment.