Skip to content
Snippets Groups Projects
Commit 8623f2d4 authored by paf's avatar paf
Browse files

also update package-lock.json

parent c816f92e
No related branches found
No related tags found
No related merge requests found
Pipeline #18887 passed with warnings
......@@ -29,7 +29,7 @@ import subprocess
VERSION_FILE = 'package.json'
VERSION_REGEX = '(?<=version": ")(.*)(?=")'
ADDITIONAL_FILES_TO_COMMIT = []
ADDITIONAL_FILES_TO_COMMIT = ['package-lock.json']
def _check_prerequisites():
......@@ -105,6 +105,10 @@ def _undo_version_update_in_files():
for file in ADDITIONAL_FILES_TO_COMMIT:
subprocess.run(f"git checkout {file}", shell=True, check=True)
def _update_package_lock():
print(f"Updating package-lock file")
subprocess.run(f"npm i --package-lock-only", shell=True, check=True)
_check_prerequisites()
pattern = re.compile(VERSION_REGEX)
......@@ -120,4 +124,5 @@ except subprocess.SubprocessError:
_stop_software()
_undo_version_update_in_files()
_stop_software()
_update_package_lock()
_git_tag()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment