diff --git a/.github/scripts/transifex.sh b/.github/scripts/transifex.sh deleted file mode 100644 index aa0af84d3..000000000 --- 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 \ No newline at end of file diff --git a/.github/workflows/build_upload.yml b/.github/workflows/build_upload.yml index d5d5a9ecb..c9a8a8808 100644 --- a/.github/workflows/build_upload.yml +++ b/.github/workflows/build_upload.yml @@ -47,7 +47,10 @@ jobs: tags: bahmni/default-config:${{env.ARTIFACT_VERSION}},bahmni/default-config:latest - 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: Update Version and Image Tag diff --git a/.github/workflows/pull_translations.yml b/.github/workflows/pull_translations.yml index 003b2647a..359fe3807 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 }}