From 6affda628707970bfdb875036b72cbf3ff04e9cd Mon Sep 17 00:00:00 2001 From: Sanket Teli <104385297+Sanket-0510@users.noreply.github.com> Date: Fri, 1 Mar 2024 18:12:57 +0530 Subject: [PATCH] [chore] fixes intendation issues in yaml file (#9668) fixes the intendation issue at: https://github.com/open-telemetry/opentelemetry-collector/blob/main/.github/workflows/prepare-release.yml **Description:** Refer - https://github.com/open-telemetry/opentelemetry-collector/pull/9409#issuecomment-1972971296 --- .github/workflows/prepare-release.yml | 43 ++++++++++++++------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index df0dcad1bfe..a44568d2e7a 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -24,29 +24,30 @@ jobs: runs-on: ubuntu-latest steps: - - name: Validate version format - run: | - validate_beta_version() { - local regex_pattern_beta='^[0-9]+\.[0-9]+\.[0-9]+$' - if [[ ! "$1" =~ $regex_pattern_beta ]]; then - echo "Invalid $2 version format. For beta, it can be 0.1.0 or higher" - exit 1 - fi - } + - name: Validate version format + run: | + validate_beta_version() { + local regex_pattern_beta='^[0-9]+\.[0-9]+\.[0-9]+$' + if [[ ! "$1" =~ $regex_pattern_beta ]]; then + echo "Invalid $2 version format. For beta, it can be 0.1.0 or higher" + exit 1 + fi + } - validate_stable_version() { - local regex_pattern_stable='^[1-9][0-9]*\.[0-9]+\.[0-9]+$' - if [[ ! "$1" =~ $regex_pattern_stable ]]; then - echo "Invalid stable version format for $2. Major version must be greater than 1." - exit 1 - fi - } + validate_stable_version() { + local regex_pattern_stable='^[1-9][0-9]*\.[0-9]+\.[0-9]+$' + if [[ ! "$1" =~ $regex_pattern_stable ]]; then + echo "Invalid stable version format for $2. Major version must be greater than 1." + exit 1 + fi + } + + validate_beta_version "${{ inputs.candidate-beta }}" "candidate-beta" + validate_beta_version "${{ inputs.current-beta }}" "current-beta" + validate_stable_version "${{ inputs.candidate-stable }}" "candidate-stable" + validate_stable_version "${{ inputs.current-stable }}" "current-stable" + shell: bash - validate_beta_version "${{ inputs.candidate-beta }}" "candidate-beta" - validate_beta_version "${{ inputs.current-beta }}" "current-beta" - validate_stable_version "${{ inputs.candidate-stable }}" "candidate-stable" - validate_stable_version "${{ inputs.current-stable }}" "current-stable" - shell: bash # Releasing opentelemetry-collector prepare-release: needs: