From 545896d02422ca3b0cf191fc2843daeb3eb085fb Mon Sep 17 00:00:00 2001 From: Baris Can Durak Date: Wed, 23 Oct 2024 10:29:57 +0200 Subject: [PATCH 1/2] script fixes --- scripts/lint.sh | 2 +- scripts/test-migrations.sh | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/lint.sh b/scripts/lint.sh index 26bbcdaa3ed..914190eba5c 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -30,7 +30,7 @@ fi # checks for yaml formatting errors if [ "$SKIP_YAMLFIX" = false ]; then - yamlfix --check .github tests --exclude "dependabot.yml" + yamlfix --check .github tests -e "dependabot.yml" -e "workflows/release_prepare.yml" -e "workflows/release_finalize.yml" fi # autoflake replacement: checks for unused imports and variables diff --git a/scripts/test-migrations.sh b/scripts/test-migrations.sh index 444550b221d..56c58bd1333 100755 --- a/scripts/test-migrations.sh +++ b/scripts/test-migrations.sh @@ -25,12 +25,6 @@ fi # List of versions to test VERSIONS=("0.40.3" "0.43.0" "0.44.3" "0.45.6" "0.47.0" "0.50.0" "0.51.0" "0.52.0" "0.53.1" "0.54.1" "0.55.5" "0.56.4" "0.57.1" "0.60.0" "0.61.0" "0.62.0" "0.63.0" "0.64.0" "0.65.0") -# Include latest release dynamically, if not there already -CURRENT_VERSION=$(cat src/zenml/VERSION) -if [[ ! " ${VERSIONS[@]} " =~ " ${CURRENT_VERSION} " ]]; then - VERSIONS+=("${CURRENT_VERSION}") -fi - # Function to compare semantic versions function version_compare() { local regex="^([0-9]+)\.([0-9]+)\.([0-9]+)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$" From e748dfcc4791941dd3a2892952853824ed455656 Mon Sep 17 00:00:00 2001 From: Baris Can Durak Date: Wed, 23 Oct 2024 11:22:10 +0200 Subject: [PATCH 2/2] using the github CLI --- scripts/test-migrations.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/test-migrations.sh b/scripts/test-migrations.sh index 56c58bd1333..088dee24445 100755 --- a/scripts/test-migrations.sh +++ b/scripts/test-migrations.sh @@ -25,6 +25,14 @@ fi # List of versions to test VERSIONS=("0.40.3" "0.43.0" "0.44.3" "0.45.6" "0.47.0" "0.50.0" "0.51.0" "0.52.0" "0.53.1" "0.54.1" "0.55.5" "0.56.4" "0.57.1" "0.60.0" "0.61.0" "0.62.0" "0.63.0" "0.64.0" "0.65.0") +# Include latest release dynamically, if not there already +LATEST_RELEASE=$(gh release view --json tagName -q '{tag: .tagName}') +LATEST_VERSION=$(echo "$LATEST_RELEASE" | jq -r .tag) + +if [[ ! " ${VERSIONS[@]} " =~ " ${LATEST_VERSION} " ]]; then + VERSIONS+=("${LATEST_VERSION}") +fi + # Function to compare semantic versions function version_compare() { local regex="^([0-9]+)\.([0-9]+)\.([0-9]+)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$"