From 8a4c6a9ced1bcb9f74a171d143fc745632184a34 Mon Sep 17 00:00:00 2001 From: nigeljamesstevenson <105309450+nigeljamesstevenson@users.noreply.github.com> Date: Tue, 9 Apr 2024 00:42:31 +0100 Subject: [PATCH] Update test-assistant-api-rest-change-tracker.yml --- .../test-assistant-api-rest-change-tracker.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-assistant-api-rest-change-tracker.yml b/.github/workflows/test-assistant-api-rest-change-tracker.yml index 5ffc61e80364d..7e221c8b2718e 100644 --- a/.github/workflows/test-assistant-api-rest-change-tracker.yml +++ b/.github/workflows/test-assistant-api-rest-change-tracker.yml @@ -104,7 +104,18 @@ jobs: # Initialize the starting version and date initial_year=2024 initial_month=6 # June - versions_to_calculate=12 + + # Assuming the script is being run in a year >= 2024 + current_year=$(date +%Y) # Get the current year + + # Calculate additional versions based on the year difference from 2024, inclusive + additional_versions=$(( (current_year - 2024 + 2) * 12 )) + + # Now, set the versions_to_calculate to this value + versions_to_calculate=$additional_versions + + # Output the value of versions_to_calculate + echo "Versions to calculate: $versions_to_calculate" # Declare associative array declare -A MILESTONE_DATES_TEST