From 3c54000701b7e70a989420b60b1c19aae2986797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Fri, 11 Nov 2022 23:03:19 +0100 Subject: [PATCH] Using Python 3.9 --- .github/update_distribution.sh | 21 +++++++++++++-------- .github/workflows/update_distribution.yml | 4 ++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/update_distribution.sh b/.github/update_distribution.sh index 95d032a25..df6fc3ead 100755 --- a/.github/update_distribution.sh +++ b/.github/update_distribution.sh @@ -681,11 +681,7 @@ copy_file_according_to_extension() { } is_mgl_file() { - if is_not_file_extension "${1}" "mgl" ; then - return 1 - else - return 0 - fi + is_file_extension "${1}" "mgl" } is_doc_file() { @@ -722,14 +718,23 @@ is_not_zip_release() { } is_not_file_extension() { + local INPUT_FILE="${1}" + local EXPECTED_EXTENSION="${2}" + if is_file_extension "${INPUT_FILE}" "${EXPECTED_EXTENSION}" ; then + return 1 + fi + >&2 echo "${PROCESS_URL_CTX}: ${INPUT_FILE} is NOT a ${EXPECTED_EXTENSION^^} file." + return 0 +} + +is_file_extension() { local INPUT_FILE="${1}" local EXPECTED_EXTENSION="${2}" local ACTUAL_EXTENSION="${INPUT_FILE#*.}" if [[ "${INPUT_FILE}" == "" ]] || [[ "${ACTUAL_EXTENSION,,}" != "${EXPECTED_EXTENSION,,}" ]] ; then - >&2 echo "${PROCESS_URL_CTX}: ${INPUT_FILE} is NOT a ${EXPECTED_EXTENSION^^} file." - return 0 + return 1 fi - return 1 + return 0 } is_empty_release() { diff --git a/.github/workflows/update_distribution.yml b/.github/workflows/update_distribution.yml index e7b08e570..e21ce5d35 100644 --- a/.github/workflows/update_distribution.yml +++ b/.github/workflows/update_distribution.yml @@ -16,6 +16,10 @@ jobs: - name: Install apt-get utilities run: sudo apt-get install detox sharutils + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - uses: actions/checkout@v2 with: ref: develop