From e99906a18a6200cf5bddf9b47db25fc38fca0f1c Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 9 Jan 2021 18:40:52 +0100 Subject: [PATCH] update package-lock.json in gulp task --- .gitlab-ci.yml | 1 - gulpfile.js | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad898eb5..1b13b711 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -85,7 +85,6 @@ release-patch: git branch -D ci-processing || true git checkout -b ci-processing npm run updateManifest -- --update=${RELEASE_TYPE} - npm install RELEASE_VERSION=$(jq -r '.version' < package.json) git add package.json package-lock.json src/system.json git --no-pager diff diff --git a/gulpfile.js b/gulpfile.js index 295dc429..1cf31998 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -262,6 +262,7 @@ async function linkUserData() { */ function updateManifest(cb) { const packageJson = fs.readJSONSync("package.json"); + const packageLockJson = fs.readJSONSync("package-lock.json"); const manifest = getManifest(); if (!manifest) cb(Error(chalk.red("Manifest JSON not found"))); @@ -306,6 +307,7 @@ function updateManifest(cb) { console.log(`Updating version number to '${targetVersion}'`); packageJson.version = targetVersion; + packageLockJson.version = targetVersion; manifest.file.version = targetVersion; /* Update URL */ @@ -320,6 +322,7 @@ function updateManifest(cb) { }) + "\n"; fs.writeJSONSync("package.json", packageJson, { spaces: 4 }); + fs.writeJSONSync("package-lock.json", packageLockJson, { spaces: 4 }); fs.writeFileSync(path.join(manifest.root, manifest.name), prettyProjectJson, "utf8"); return cb();