Skip to content

Commit

Permalink
chore(v2): install Crowdin cli through npm package (#4030)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Jan 12, 2021
1 parent 66cc736 commit 20b6997
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"serve:v2:ssl:message": "echo '\n\n\nServing Docusaurus with HTTPS on localhost requires to disable the Chrome security: chrome://flags/#allow-insecure-localhost\n\n\n'",
"serve:v2:ssl:serve": "serve website/build --ssl-cert ./website/.docusaurus/selfsigned.crt --ssl-key ./website/.docusaurus/selfsigned.key",
"crowdin:upload:v2": "crowdin upload sources --config ./crowdin-v2.yaml",
"crowdin:uploadTranslations:v2": "crowdin upload translations --config ./crowdin-v2.yaml",
"crowdin:download:v2": "crowdin download --config ./crowdin-v2.yaml",
"canary": "yarn canary:bumpVersion && yarn canary:publish",
"canary:bumpVersion": "yarn lerna version 2.0.0-alpha.`git rev-parse --short HEAD` --exact --no-push --yes",
Expand Down Expand Up @@ -69,6 +68,7 @@
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@crowdin/cli": "^3.5.2",
"@types/express": "^4.17.2",
"@types/fs-extra": "^9.0.4",
"@types/inquirer": "^6.5.0",
Expand Down
9 changes: 4 additions & 5 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
"build:bootstrap": "cross-env DOCUSAURUS_PRESET=bootstrap yarn build",
"start:blogOnly": "cross-env DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn start",
"build:blogOnly": "cross-env DOCUSAURUS_CONFIG='docusaurus.config-blog-only.js' yarn build",
"netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:install && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build",
"netlify:build:production": "yarn docusaurus write-translations && yarn netlify:crowdin:uploadSources && yarn netlify:crowdin:downloadTranslations && yarn build",
"netlify:build:deployPreview": "yarn docusaurus write-translations --locale fr --messagePrefix '(fr) ' && yarn netlify:build:deployPreview:v1:all && yarn netlify:build:deployPreview:classic && yarn netlify:build:deployPreview:bootstrap && yarn netlify:build:deployPreview:blogOnly",
"netlify:build:deployPreview:classic": "cross-env BASE_URL='/classic/' yarn build --out-dir netlifyDeployPreview/classic",
"netlify:build:deployPreview:bootstrap": "echo 'netlify:build:deployPreview:bootstrap temporarily disabled' || cross-env BASE_URL='/bootstrap/' DOCUSAURUS_PRESET=bootstrap DISABLE_VERSIONING=true yarn build --out-dir netlifyDeployPreview/bootstrap",
"netlify:build:deployPreview:blogOnly": "yarn build:blogOnly --out-dir netlifyDeployPreview/blog-only",
"netlify:build:deployPreview:v1:all": "yarn --cwd .. netlify:deployPreview:v1 && yarn --cwd .. netlify:deployPreview:v1-migrated",
"netlify:crowdin:install": "cd .. && java -version && curl -L https://github.com/crowdin/crowdin-cli/releases/download/3.5.1/crowdin-cli.zip --output crowdin-cli.zip && unzip crowdin-cli.zip && cp 3.5.1/crowdin-cli.jar crowdin-cli.jar && java -jar crowdin-cli.jar --version",
"netlify:crowdin:downloadTranslations": "cd .. && java -jar crowdin-cli.jar download --config ./crowdin-v2.yaml",
"netlify:crowdin:downloadTranslationsFailSafe": "yarn netlify:crowdin:downloadTranslations || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)'",
"netlify:crowdin:uploadSources": "cd .. && java -jar crowdin-cli.jar upload sources --config ./crowdin-v2.yaml",
"netlify:crowdin:downloadTranslations": "yarn --cwd .. crowdin:download:v2",
"netlify:crowdin:downloadTranslationsFailSafe": "yarn --cwd .. crowdin:download:v2 || echo 'Crowdin translation download failure (only internal PRs have access to the Crowdin env token)'",
"netlify:crowdin:uploadSources": "yarn --cwd .. crowdin:upload:v2",
"netlify:test": "yarn netlify:build:deployPreview && yarn netlify dev --debug"
},
"dependencies": {
Expand Down
16 changes: 16 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,13 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@crowdin/cli@^3.5.2":
version "3.5.2"
resolved "https://registry.yarnpkg.com/@crowdin/cli/-/cli-3.5.2.tgz#97782a5e72d97bf841032e555deae2838f8de206"
integrity sha512-zoZKQM6RPnRq8UVfGrSY+QxOc4pya4HzgAabVG/bVPxL2v4H1Q258XWysQxmnW0/3GJaO73SJyG5+Y7cRdF+wQ==
dependencies:
shelljs "^0.7.5"

"@csstools/convert-colors@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
Expand Down Expand Up @@ -18185,6 +18192,15 @@ shell-quote@1.7.2:
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==

shelljs@^0.7.5:
version "0.7.8"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
integrity sha1-3svPh0sNHl+3LhSxZKloMEjprLM=
dependencies:
glob "^7.0.0"
interpret "^1.0.0"
rechoir "^0.6.2"

shelljs@^0.8.4:
version "0.8.4"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.4.tgz#de7684feeb767f8716b326078a8a00875890e3c2"
Expand Down

0 comments on commit 20b6997

Please sign in to comment.