From eced69f1ce568fdbcab3794e862efa03a07a8547 Mon Sep 17 00:00:00 2001 From: Rahul Ramesh Date: Sun, 24 Mar 2024 21:42:51 +0530 Subject: [PATCH] [Rahul] | BAH-3710 | Fix. Remove Transifex Script --- .github/scripts/transifex.sh | 34 -------------------- .github/workflows/build_publish_openelis.yml | 5 ++- .github/workflows/pull_translations.yml | 5 ++- 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 .github/scripts/transifex.sh diff --git a/.github/scripts/transifex.sh b/.github/scripts/transifex.sh deleted file mode 100644 index aa0af84d..00000000 --- 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_publish_openelis.yml b/.github/workflows/build_publish_openelis.yml index 2a7c8985..6d1a8a06 100644 --- a/.github/workflows/build_publish_openelis.yml +++ b/.github/workflows/build_publish_openelis.yml @@ -66,6 +66,9 @@ jobs: tags: bahmni/openelis:${{env.ARTIFACT_VERSION}},bahmni/openelis: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 }} diff --git a/.github/workflows/pull_translations.yml b/.github/workflows/pull_translations.yml index 3513aad0..f52c25d9 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 }}