Skip to content

Commit

Permalink
Replace = separator with :
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Dec 7, 2024
1 parent 9830d69 commit d863c8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ for version in "${version_v1}" "${version_v2}"; do
gen_cli_docs_v1 ${versionMajorMinor}
fi

versions=$(grep -E "versions${var_suffix} *=" "${config_file}")
versions=$(grep -E "versions${var_suffix} *:" "${config_file}")
if [[ "$versions" == *"$versionMajorMinor"* ]]; then
echo "🔴 ERROR: Version ${versionMajorMinor} is already included in the versions list."
exit 1
fi

sed -i -e "s/latest${var_suffix} *=.*$/latest${var_suffix} = \"${versionMajorMinor}\"/" "${config_file}"
sed -i -e "s/binariesLatest${var_suffix} *=.*$/binariesLatest${var_suffix} = \"${version}\"/" "${config_file}"
sed -i -e "s/versions${var_suffix} *= *\[/versions${var_suffix} = \[\"${versionMajorMinor}\"\,/" "${config_file}"
sed -i -e "s/latest${var_suffix} *:.*$/latest${var_suffix}: \"${versionMajorMinor}\"/" "${config_file}"
sed -i -e "s/binariesLatest${var_suffix} *:.*$/binariesLatest${var_suffix}: \"${version}\"/" "${config_file}"
sed -i -e "s/versions${var_suffix} *: *\[/versions${var_suffix}: \[\"${versionMajorMinor}\"\,/" "${config_file}"
done

if [[ "$DRY_RUN" = "true" ]]; then
Expand Down

0 comments on commit d863c8e

Please sign in to comment.