From dd9752246caecac962e7bb7c695d5f326edd7692 Mon Sep 17 00:00:00 2001 From: fabianosan Date: Mon, 11 Nov 2024 17:00:54 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20de=20release=20autom=C3=A1?= =?UTF-8?q?tico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 10 ++++++---- lambda_functions/lambda_function.py | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e67b807..4f66740 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,12 +57,14 @@ jobs: if [ -z "$latest_tag" ]; then latest_tag="lambda_functions_v0.1" fi - version=$(echo $latest_tag | sed 's/lambda_functions_v//') - IFS='.' read -r major minor patch <<< "$version" - minor=$((minor + 1)) + + version=$(echo "$latest_tag" | sed 's/lambda_functions_v//') + IFS='.' read -r major minor <<< "$version" + minor=$((minor + 1)) new_version="lambda_functions_v${major}.${minor}" + echo "New version is $new_version" - echo "new_version=$new_version" >> $GITHUB_ENV + echo "new_version=$new_version" >> $GITHUB_ENV # Cria um arquivo ZIP com os artefatos da pasta lambda_functions (se houver mudanças) - name: Zip lambda_functions folder diff --git a/lambda_functions/lambda_function.py b/lambda_functions/lambda_function.py index 5aaab00..6b3f2f6 100644 --- a/lambda_functions/lambda_function.py +++ b/lambda_functions/lambda_function.py @@ -338,5 +338,4 @@ def handle(self, handler_input, exception): sb.add_request_handler(CancelOrStopIntentHandler()) sb.add_request_handler(SessionEndedRequestHandler()) sb.add_exception_handler(CatchAllExceptionHandler()) - lambda_handler = sb.lambda_handler() \ No newline at end of file