mirror of
https://github.com/traccar/traccar-web.git
synced 2025-01-08 12:07:27 +08:00
Update scripts
This commit is contained in:
parent
f82c2d0cc9
commit
63aa40978c
8
.github/workflows/legacy.yml
vendored
8
.github/workflows/legacy.yml
vendored
@ -5,12 +5,12 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- web/**
|
||||
- legacy/**
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- web/**
|
||||
- legacy/**
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -22,6 +22,8 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: npm
|
||||
cache-dependency-path: package-lock.json
|
||||
cache-dependency-path: legacy/package-lock.json
|
||||
- run: npm ci --ignore-scripts
|
||||
working-directory: legacy
|
||||
- run: npm run lint
|
||||
working-directory: legacy
|
||||
|
8
.github/workflows/modern.yml
vendored
8
.github/workflows/modern.yml
vendored
@ -4,13 +4,9 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- modern/**
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- modern/**
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -22,8 +18,6 @@ jobs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
cache: npm
|
||||
cache-dependency-path: modern/package-lock.json
|
||||
cache-dependency-path: package-lock.json
|
||||
- run: npm ci
|
||||
working-directory: modern
|
||||
- run: npm run lint
|
||||
working-directory: modern
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname $0)
|
||||
cd ..
|
||||
|
||||
rm -rf web/lib
|
||||
npm ci --unsafe-perm
|
||||
npm run build
|
||||
|
||||
cd modern
|
||||
|
||||
rm -rf build
|
||||
npm ci
|
||||
npm run build
|
@ -26,7 +26,5 @@ for language in languages:
|
||||
print(language.code)
|
||||
url = transifex_api.ResourceTranslationsAsyncDownload.download(resource=resource, language=language)
|
||||
result = requests.get(url)
|
||||
with open('../web/l10n/' + language.code + '.json', "w") as file:
|
||||
file.write(result.text)
|
||||
with open('../modern/src/resources/l10n/' + language.code + '.json', "w") as file:
|
||||
with open('..//src/resources/l10n/' + language.code + '.json', "w") as file:
|
||||
file.write(result.text)
|
||||
|
Loading…
Reference in New Issue
Block a user