mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #4685 from overleaf/jpa-translations-sync
[misc] update translations sync for monorepo GitOrigin-RevId: 794a9192212f7b63c040a08c42a1e9c6b3341609
This commit is contained in:
parent
77bcd4c39e
commit
7dc6456dca
4 changed files with 33 additions and 4 deletions
|
@ -1,14 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [[ -z "$BRANCH_NAME" ]]; then
|
SCRIPT_PATH=$(realpath "${BASH_SOURCE[0]}")
|
||||||
BRANCH_NAME=master
|
SCRIPT_DIR=$(dirname "$SCRIPT_PATH")
|
||||||
fi
|
WEB_DIR=$(dirname "$SCRIPT_DIR")
|
||||||
|
|
||||||
|
cd "$WEB_DIR"
|
||||||
|
|
||||||
if [[ `git status --porcelain=2 locales/` ]]; then
|
if [[ `git status --porcelain=2 locales/` ]]; then
|
||||||
git add locales/*
|
git add locales/*
|
||||||
git commit -m "auto update translation"
|
git commit -m "auto update translation"
|
||||||
git push "$UPSTREAM_REPO" "HEAD:$BRANCH_NAME"
|
# Switch the cloudbuild clone from https to ssh authentication.
|
||||||
|
git remote set-url --push origin git@github.com:overleaf/internal.git
|
||||||
|
git push origin "HEAD:$BRANCH_NAME"
|
||||||
else
|
else
|
||||||
echo 'No changes'
|
echo 'No changes'
|
||||||
fi
|
fi
|
||||||
|
|
6
services/web/scripts/translations/.dockerignore
Normal file
6
services/web/scripts/translations/.dockerignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Limit code access with minimal docker image.
|
||||||
|
cloudbuild.yaml
|
||||||
|
docker-compose.yml
|
||||||
|
Dockerfile
|
7
services/web/scripts/translations/Dockerfile
Normal file
7
services/web/scripts/translations/Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM node:12.22.3
|
||||||
|
|
||||||
|
WORKDIR /app/scripts/translations
|
||||||
|
|
||||||
|
COPY . /app/scripts/translations/
|
||||||
|
|
||||||
|
RUN npm ci --quiet
|
12
services/web/scripts/translations/docker-compose.yml
Normal file
12
services/web/scripts/translations/docker-compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
version: "2.3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
onesky-client-jail:
|
||||||
|
build: .
|
||||||
|
volumes:
|
||||||
|
# NOTE: Limit code access with targeted bind mount:
|
||||||
|
# Give it read-and-write access to the locales.
|
||||||
|
- ../../locales:/app/locales:rw
|
||||||
|
environment:
|
||||||
|
- ONE_SKY_PUBLIC_KEY
|
||||||
|
- ONE_SKY_PRIVATE_KEY
|
Loading…
Reference in a new issue