Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CLI v4 #739

Merged
merged 57 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b9d685f
docs: add the releases section
andrii-bodnar Mar 15, 2024
ea9e64d
feat: delete screenshot by id (#736)
yevheniyJ Mar 18, 2024
b83624b
feat: glossary & tm updates (#737)
yevheniyJ Mar 18, 2024
732cf48
fix: updated docs (#740)
yevheniyJ Mar 18, 2024
9fbf003
fix: removed unused strings (#741)
yevheniyJ Mar 18, 2024
3bd747f
Merge branch 'main' into next-v4
andrii-bodnar Mar 19, 2024
ed16a2e
feat: branch list rework (#743)
yevheniyJ Mar 20, 2024
1cb1d93
feat: language list updates (#744)
yevheniyJ Mar 21, 2024
1c54a70
feat: crowdin file list, remove generate alias (#746)
yevheniyJ Mar 25, 2024
3478127
feat: string add with branch (#748)
yevheniyJ Mar 25, 2024
288091c
Merge branch 'main' into next-v4
andrii-bodnar Mar 26, 2024
44e45d1
feat: remove compatibility for file ids in task add command (#755)
katerina20 Mar 28, 2024
5ee8625
feat: drop targets (#758)
yevheniyJ Apr 1, 2024
67de41f
feat: pre-translate "file" param (#759)
yevheniyJ Apr 2, 2024
1280d92
Merge branch 'main' into next-v4
andrii-bodnar Apr 2, 2024
75299d6
ci: run build and tests on PRs to next-v4
andrii-bodnar Apr 4, 2024
0f32421
feat: all for language parameter in the download command (#760)
katerina20 Apr 5, 2024
901dab5
feat: crowdin config (#761)
yevheniyJ Apr 5, 2024
ea066a9
feat: language list update (#762)
yevheniyJ Apr 5, 2024
1e64448
docs: remove experimental warning in file command (#764)
katerina20 Apr 8, 2024
ed2bd53
fix: normalize branch name (#763)
yevheniyJ Apr 8, 2024
d97ac2d
feat: type and parser version options for file upload (#765)
katerina20 Apr 11, 2024
28c1565
feat: crowdin string updates (#766)
yevheniyJ Apr 15, 2024
db75fdf
feat: crowdin project commands (#767)
yevheniyJ Apr 16, 2024
1433759
chore: improve messages (#772)
andrii-bodnar Apr 19, 2024
de67290
feat: output updates (#768)
yevheniyJ Apr 30, 2024
d74e945
feat: branch clone command (#773)
katerina20 May 2, 2024
cdc47a1
Merge branch 'main' into next-v4
andrii-bodnar May 2, 2024
60f870c
fix: "b" alias (#778)
yevheniyJ May 7, 2024
f873704
feat: completion script (#779)
yevheniyJ May 7, 2024
24eeb68
docs: separate 'Autocompletion' page (#780)
andrii-bodnar May 7, 2024
e3d6de3
docs: improve the v4 release notes (#782)
andrii-bodnar May 9, 2024
54f6a12
docs: improve the v4 release notes (#783)
andrii-bodnar May 10, 2024
843cee9
feat: java21 upgrade (#786)
yevheniyJ May 13, 2024
6dd7705
feat: improved exit codes (#785)
yevheniyJ May 13, 2024
f624515
fix: downgrade to java 17 (#789)
yevheniyJ May 14, 2024
e5d037d
docs: v4 preparements (#791)
andrii-bodnar May 14, 2024
01f4837
fix: missed plain mode options (#788)
katerina20 May 15, 2024
79a52f8
feat: use environment vars when config file is absent (#777)
katerina20 May 15, 2024
a365963
docs: move some articles to blog (#793)
andrii-bodnar May 15, 2024
fda6763
feat: bundle download (#795)
yevheniyJ May 16, 2024
81d0b09
Merge branch 'main' into next-v4
andrii-bodnar May 16, 2024
ebbe795
feat: quite option for init command (#797)
yevheniyJ May 16, 2024
d21e968
fix: fix name (#799)
yevheniyJ May 16, 2024
206ca40
feat: comment add (#801)
yevheniyJ May 17, 2024
b60f05e
feat: context parameter for file upload (#802)
katerina20 May 20, 2024
2e68e5d
feat: ai pre-translate (#803)
yevheniyJ May 20, 2024
54dfc8f
feat: branch merge (#804)
yevheniyJ May 20, 2024
7ccb01b
docs: more improvements to the v4 release notes (#800)
andrii-bodnar May 20, 2024
5d00302
fix: bundle download error message (#805)
yevheniyJ May 21, 2024
407150a
fix: retries for uploads (#806)
katerina20 May 22, 2024
df576ef
fix: file param validation (#808)
yevheniyJ May 23, 2024
8716ee4
fix: fixed outputs (#809)
yevheniyJ May 28, 2024
ffacf0b
docs: website polishing (#807)
andrii-bodnar May 28, 2024
0c868a4
docs: rename deb and rpm packages (#811)
andrii-bodnar May 28, 2024
61ea49c
fix: task list formatting
andrii-bodnar May 28, 2024
eb1645b
chore(release): version 4.0.0
andrii-bodnar May 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'CONTRIBUTING.md'
- 'LICENSE'
pull_request:
branches: [ 'main' ]
branches: [ 'main', 'next-v4' ]

jobs:
build:
Expand All @@ -20,12 +20,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Execute Gradle build
run: ./gradlew build

Expand Down Expand Up @@ -55,12 +52,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run Tests
run: ./gradlew test

Expand Down Expand Up @@ -97,7 +91,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Install asciidoctor and pandoc
Expand Down Expand Up @@ -129,7 +123,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Prepare distribution
Expand All @@ -147,7 +141,7 @@ jobs:

- name: Build and install the package
run: |
sudo npm install --location=global jdeploy@4.0.22
sudo npm install --location=global jdeploy@4.0.43
npm install
jdeploy install

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run static analysis
run: ./gradlew build staticAnalysis -P staticAnalysisMarker

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Install asciidoctor and pandoc
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Generate autocomplete script
run: |
./gradlew shadowJar
Expand Down Expand Up @@ -87,7 +84,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
java-version: 17
cache: 'gradle'

- name: Generate autocomplete script
Expand All @@ -110,7 +107,7 @@ jobs:

- name: Build and install the package
run: |
sudo npm install --location=global jdeploy@4.0.22
sudo npm install --location=global jdeploy@4.0.43
npm install
jdeploy install
mv build/libs/crowdin_completion jdeploy-bundle/crowdin_completion
Expand Down Expand Up @@ -187,7 +184,7 @@ jobs:

- name: install local package
run: |
choco install jdk8
choco install temurin
choco install crowdin-cli -s . -y

- name: Choco publish
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [4.0.0](https://github.com/crowdin/crowdin-cli/compare/3.19.4...4.0.0) (2024-05-28)

* [Release Notes](https://crowdin.github.io/crowdin-cli/blog/2024/05/28/cli-v4)

## [3.19.4](https://github.com/crowdin/crowdin-cli/compare/3.19.3...3.19.4) (2024-05-16)


Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Crowdin CLI is a command line tool that allows you to manage and synchronize you
- automate the process of updating your source files in your Crowdin project
- download translations from Crowdin and automatically save them in the correct locations
- upload all your existing translations to Crowdin in minutes
- integrate Crowdin with GIT, SVN, Mercurial, and other software
- manage your localization resources without leaving the terminal
- integrate Crowdin CLI with GitHub, GitLab, Jenkins, CircleCI, and other software

This is a cross-platform and it runs in a terminal on Linux based and macOS operating systems or in Command Prompt on Windows.
It is cross-platform and runs in a terminal on Linux-based and macOS operating systems, or in the command prompt on Windows.

<div align="center">

Expand Down Expand Up @@ -45,17 +46,12 @@ This is a cross-platform and it runs in a terminal on Linux based and macOS oper

Visit the [documentation](https://crowdin.github.io/crowdin-cli/) for more details.

## Seeking Assistance
## Seeking Assistance and Contributing

If you find any problems or would like to suggest a feature, please read the [How can I contribute](/CONTRIBUTING.md#how-can-i-contribute) section in our contributing guidelines.

Need help working with Crowdin CLI or have a question? Visit our [Community Forum](https://community.crowdin.com/) or contact [Customer Success Service](https://crowdin.com/contacts).

## Contributing

If you would like to contribute, please read the [Contributing Guidelines](/CONTRIBUTING.md).

## License

<pre>
The Crowdin CLI is licensed under the MIT License.
See the LICENSE file distributed with this work for additional
Expand Down
10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import static de.fayard.refreshVersions.core.Versions.versionFor

plugins {
id 'java'
id 'com.github.johnrengelman.shadow'
id 'io.github.goooler.shadow' //TODO find alternative
id 'jacoco'
id 'com.github.spotbugs'
id 'org.asciidoctor.jvm.convert'
}

group 'com.crowdin'
version '3.19.4'
version '4.0.0'

sourceCompatibility = 1.8
sourceCompatibility = '17'

if (!hasProperty('mainClass')) {
ext.mainClass = 'com.crowdin.cli.Cli'
Expand Down Expand Up @@ -62,6 +62,10 @@ dependencies {
annotationProcessor "info.picocli:picocli-codegen:_"
}

wrapper {
gradleVersion = '8.5'
}

jar {
manifest {
attributes 'Implementation-Title': 'Crowdin CLI',
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
"type": "git",
"url": "https://github.com/crowdin/crowdin-cli.git"
},
"version": "3.19.4",
"version": "4.0.0",
"bin": {
"crowdin": "jdeploy-bundle/jdeploy.js"
},
"jdeploy": {
"jar": "dist/crowdin-cli.jar"
"jar": "dist/crowdin-cli.jar",
"javaVersion": "17"
},
"dependencies": {
"command-exists-promise": "^2.0.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/aur/pkgbuild/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Maintainer: Senya <senya at riseup.net>
pkgname=crowdin-cli
pkgver=3.19.4
pkgver=4.0.0
pkgrel=1
pkgdesc="Command line tool that allows you to manage and synchronize localization resources with your Crowdin project"
url="https://support.crowdin.com/cli-tool/"
license=('MIT')
depends=('java-runtime>=8')
makedepends=('git' 'java-environment>=8' 'grep' 'awk')
depends=('java-runtime>=17')
makedepends=('git' 'java-environment>=17' 'grep' 'awk')
conflicts=('crowdin-cli-bin')
arch=('any')
md5sums=('SKIP' 'b018bcf51df64a8e68450cd7ac0e3838')
Expand Down
4 changes: 2 additions & 2 deletions packages/chocolatey/crowdin-cli.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>crowdin-cli</id>
<version>3.19.4</version>
<version>4.0.0</version>
<packageSourceUrl>https://github.com/crowdin/crowdin-cli/tree/main/packages/chocolatey</packageSourceUrl>
<owners>crowdin</owners>
<title>Crowdin CLI (Portable)</title>
Expand All @@ -25,7 +25,7 @@
- This is a cross-platform and it runs in a terminal on Linux based and macOS operating systems or in Command Prompt on Windows. </description>
<releaseNotes>https://github.com/crowdin/crowdin-cli/releases</releaseNotes>
<dependencies>
<dependency id="jdk8" />
<dependency id="jdk17" />
</dependencies>
</metadata>
<files>
Expand Down
2 changes: 1 addition & 1 deletion packages/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine

RUN apk --no-cache add sudo openjdk11-jre --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community;
RUN apk --no-cache add sudo openjdk17-jre --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community;

ADD https://github.com/crowdin/crowdin-cli/releases/latest/download/crowdin-cli.zip /usr/

Expand Down
Loading
Loading