diff --git a/.github/scripts/transifex.sh b/.github/scripts/transifex.sh deleted file mode 100755 index 9266188bd5..0000000000 --- a/.github/scripts/transifex.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -function command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -if ! command_exists tx; then - echo "Transifex CLI is not installed. Installing..." - curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash - mv tx /usr/local/bin/tx -fi - -if [ ! -f .tx/config ]; then - echo "Transifex config file (.tx/config) not found in the repository." - exit 1 -fi - -if [ "$1" == "push" ]; then - echo "Pushing translation source file to Transifex..." - tx push -s -elif [ "$1" == "pull" ]; then - echo "Pulling translations from Transifex..." - tx pull -t -s --mode reviewed --use-git-timestamps -else - echo "Invalid operation. Please specify either 'push' or 'pull'." - exit 1 -fi - -if [ $? -ne 0 ]; then - echo "Error: Transifex operation failed. Please check the error message above." - exit 1 -else - echo "Transifex operation completed successfully." -fi diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index fd8f38883a..f0df9c0654 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -45,7 +45,10 @@ jobs: uses: docker/setup-qemu-action@v2 - name: Push Translations to Transifex run: | - bash .github/scripts/transifex.sh push + curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh + chmod +x transifex.sh + ./transifex.sh push + rm transifex.sh env: TX_TOKEN: ${{ secrets.TX_TOKEN }} - name: Set up Docker Buildx diff --git a/.github/workflows/pull_translations.yml b/.github/workflows/pull_translations.yml index 26bdf6cbb2..8b14703710 100644 --- a/.github/workflows/pull_translations.yml +++ b/.github/workflows/pull_translations.yml @@ -18,7 +18,10 @@ jobs: - name: Pull Translations from Transifex run: | - bash .github/scripts/transifex.sh pull + curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh + chmod +x transifex.sh + ./transifex.sh pull + rm transifex.sh env: TX_TOKEN: ${{ secrets.TX_TOKEN }}