mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 09:51:39 -05: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
|
checks: checks-frontend checks-backend
|
||||||
|
|
||||||
.PHONY: checks-frontend
|
.PHONY: checks-frontend
|
||||||
checks-frontend: svg-check
|
checks-frontend: lockfile-check svg-check
|
||||||
|
|
||||||
.PHONY: checks-backend
|
.PHONY: checks-backend
|
||||||
checks-backend: swagger-check swagger-validate
|
checks-backend: swagger-check swagger-validate
|
||||||
|
@ -700,6 +700,17 @@ svg-check: svg
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
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
|
.PHONY: update-translations
|
||||||
update-translations:
|
update-translations:
|
||||||
mkdir -p ./translations
|
mkdir -p ./translations
|
||||||
|
|
1
package-lock.json
generated
1
package-lock.json
generated
|
@ -4,6 +4,7 @@
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
|
"name": "gitea",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@claviska/jquery-minicolors": "2.3.6",
|
"@claviska/jquery-minicolors": "2.3.6",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"name": "gitea",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
Loading…
Reference in a new issue