mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
Add lockfile-check (#18285)
* Add lockfile-check This check runs `npm install` which will rewrite the lockfile in case it is inconsistent with package.json. This check detects this and will fail the CI in such a case.
This commit is contained in:
parent
d7c2a2951c
commit
0ed9b006e8
3 changed files with 14 additions and 1 deletions
13
Makefile
13
Makefile
|
@ -292,7 +292,7 @@ fmt-check:
|
|||
checks: checks-frontend checks-backend
|
||||
|
||||
.PHONY: checks-frontend
|
||||
checks-frontend: svg-check
|
||||
checks-frontend: lockfile-check svg-check
|
||||
|
||||
.PHONY: checks-backend
|
||||
checks-backend: swagger-check swagger-validate
|
||||
|
@ -700,6 +700,17 @@ svg-check: svg
|
|||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: lockfile-check
|
||||
lockfile-check:
|
||||
npm install --package-lock-only
|
||||
@diff=$$(git diff package-lock.json); \
|
||||
if [ -n "$$diff" ]; then \
|
||||
echo "package-lock.json is inconsistent with package.json"; \
|
||||
echo "Please run 'npm install --package-lock-only' and commit the result:"; \
|
||||
echo "$${diff}"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: update-translations
|
||||
update-translations:
|
||||
mkdir -p ./translations
|
||||
|
|
1
package-lock.json
generated
1
package-lock.json
generated
|
@ -4,6 +4,7 @@
|
|||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gitea",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@claviska/jquery-minicolors": "2.3.6",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"name": "gitea",
|
||||
"license": "MIT",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
|
Loading…
Reference in a new issue