2020-10-02 12:18:13 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# For snapshots, please specify the full version (with date and time)
|
2021-06-12 15:32:56 +08:00
|
|
|
cdist_version="0.1.0-20210612.072458-9"
|
2020-10-02 12:18:13 +08:00
|
|
|
cdist_path_version="$cdist_version"
|
|
|
|
|
|
|
|
if [ -n "${cdist_version#*-}" ]; then
|
|
|
|
cdist_path_version="${cdist_version%%-*}-SNAPSHOT"
|
|
|
|
fi
|
|
|
|
url="https://maven.enginehub.org/repo/org/enginehub/crowdin/crowdin-distributor/$cdist_path_version/crowdin-distributor-$cdist_version-bundle.zip"
|
2020-10-02 16:53:14 +08:00
|
|
|
[ -d ./build ] || mkdir ./build
|
2020-10-02 12:18:13 +08:00
|
|
|
curl "$url" >./build/cdist.zip
|
2020-10-02 16:47:00 +08:00
|
|
|
(cd ./build && unzip -o cdist.zip)
|
2020-10-02 12:18:13 +08:00
|
|
|
|
|
|
|
# CROWDIN_DISTRIBUTOR_TOKEN is set by CI
|
2020-10-02 12:40:55 +08:00
|
|
|
export CROWDIN_DISTRIBUTOR_ON_CHANGE="true"
|
2020-10-02 12:18:13 +08:00
|
|
|
export CROWDIN_DISTRIBUTOR_PROJECT_ID="360697"
|
|
|
|
export CROWDIN_DISTRIBUTOR_MODULE="worldedit-lang"
|
2020-11-29 06:51:29 +08:00
|
|
|
## Full path to the source file, will be uploaded to crowdin, must already have uploaded at least once (will not create a new file)
|
|
|
|
export CROWDIN_DISTRIBUTOR_SOURCE_FILE="./worldedit-core/src/main/resources/lang/strings.json"
|
2020-10-02 12:18:13 +08:00
|
|
|
# Artifactory & Build Number is set by CI
|
2021-06-12 15:32:56 +08:00
|
|
|
export CROWDIN_DISTRIBUTOR_OPTS=""
|
2020-10-02 12:18:13 +08:00
|
|
|
"./build/crowdin-distributor-$cdist_path_version/bin/crowdin-distributor"
|